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_BUNDLE_LIB_PATH
 692 FREETYPE_LIBS
 693 FREETYPE_CFLAGS
 694 CUPS_CFLAGS
 695 X_EXTRA_LIBS
 696 X_LIBS
 697 X_PRE_LIBS
 698 X_CFLAGS
 699 XMKMF
 700 MSVCP_DLL
 701 MSVCR_DLL
 702 LIBCXX
 703 FIXPATH_DETACH_FLAG
 704 FIXPATH
 705 BUILD_GTEST
 706 ENABLE_AOT
 707 GCOV_ENABLED
 708 ZIP_EXTERNAL_DEBUG_SYMBOLS
 709 COPY_DEBUG_SYMBOLS
 710 COMPILE_WITH_DEBUG_SYMBOLS
 711 CFLAGS_WARNINGS_ARE_ERRORS
 712 BUILD_CC_DISABLE_WARNING_PREFIX
 713 DISABLE_WARNING_PREFIX
 714 WARNINGS_AS_ERRORS
 715 COMPILER_SUPPORTS_TARGET_BITS_FLAG
 716 LDFLAGS_TESTEXE
 717 LDFLAGS_TESTLIB
 718 CXXFLAGS_TESTEXE
 719 CXXFLAGS_TESTLIB
 720 CFLAGS_TESTEXE
 721 CFLAGS_TESTLIB
 722 OPENJDK_BUILD_JVM_LIBS
 723 OPENJDK_BUILD_JVM_ASFLAGS
 724 OPENJDK_BUILD_JVM_LDFLAGS
 725 OPENJDK_BUILD_JVM_CFLAGS
 726 OPENJDK_BUILD_LDFLAGS_HASH_STYLE
 727 OPENJDK_BUILD_LDFLAGS_CXX_JDK
 728 OPENJDK_BUILD_JDKEXE_LIBS
 729 OPENJDK_BUILD_JDKLIB_LIBS
 730 OPENJDK_BUILD_LDFLAGS_JDKEXE
 731 OPENJDK_BUILD_LDFLAGS_JDKLIB
 732 OPENJDK_BUILD_CXXFLAGS_JDKEXE
 733 OPENJDK_BUILD_CXXFLAGS_JDKLIB
 734 OPENJDK_BUILD_CFLAGS_JDKEXE
 735 OPENJDK_BUILD_CFLAGS_JDKLIB
 736 OPENJDK_BUILD_CXXSTD_CXXFLAG
 737 JVM_LIBS
 738 JVM_ASFLAGS
 739 JVM_LDFLAGS
 740 JVM_CFLAGS
 741 LDFLAGS_HASH_STYLE
 742 LDFLAGS_CXX_JDK
 743 JDKEXE_LIBS
 744 JDKLIB_LIBS
 745 LDFLAGS_JDKEXE
 746 LDFLAGS_JDKLIB
 747 CXXFLAGS_JDKEXE
 748 CXXFLAGS_JDKLIB
 749 CFLAGS_JDKEXE
 750 CFLAGS_JDKLIB
 751 MACOSX_VERSION_MIN
 752 CXXSTD_CXXFLAG
 753 JDK_ARCH_ABI_PROP_NAME
 754 CXX_O_FLAG_SIZE
 755 CXX_O_FLAG_NONE
 756 CXX_O_FLAG_DEBUG
 757 CXX_O_FLAG_NORM
 758 CXX_O_FLAG_HI
 759 CXX_O_FLAG_HIGHEST
 760 CXX_O_FLAG_HIGHEST_JVM
 761 C_O_FLAG_SIZE
 762 C_O_FLAG_NONE
 763 C_O_FLAG_DEBUG
 764 C_O_FLAG_NORM
 765 C_O_FLAG_HI
 766 C_O_FLAG_HIGHEST
 767 C_O_FLAG_HIGHEST_JVM
 768 JVM_CFLAGS_SYMBOLS
 769 CXXFLAGS_DEBUG_SYMBOLS
 770 CFLAGS_DEBUG_SYMBOLS
 771 CXX_FLAG_DEPS
 772 C_FLAG_DEPS
 773 SHARED_LIBRARY_FLAGS
 774 SET_SHARED_LIBRARY_MAPFILE
 775 SET_SHARED_LIBRARY_NAME
 776 SET_SHARED_LIBRARY_ORIGIN
 777 SET_EXECUTABLE_ORIGIN
 778 CXX_FLAG_REORDER
 779 C_FLAG_REORDER
 780 JVM_RCFLAGS
 781 RC_FLAGS
 782 AR_OUT_OPTION
 783 LD_OUT_OPTION
 784 EXE_OUT_OPTION
 785 CC_OUT_OPTION
 786 STRIPFLAGS
 787 ARFLAGS
 788 COMPILER_BINDCMD_FILE_FLAG
 789 COMPILER_COMMAND_FILE_FLAG
 790 COMPILER_TARGET_BITS_FLAG
 791 JT_HOME
 792 JTREGEXE
 793 HOTSPOT_TOOLCHAIN_TYPE
 794 USING_BROKEN_SUSE_LD
 795 PACKAGE_PATH
 796 BUILD_AS
 797 BUILD_LDCXX
 798 BUILD_LD
 799 BUILD_STRIP
 800 BUILD_OBJCOPY
 801 BUILD_AR
 802 BUILD_NM
 803 BUILD_CXX
 804 BUILD_CC
 805 BUILD_SYSROOT_LDFLAGS
 806 BUILD_SYSROOT_CFLAGS
 807 ac_ct_OBJDUMP
 808 OBJDUMP
 809 ac_ct_OBJCOPY
 810 OBJCOPY
 811 ac_ct_NM
 812 ac_ct_STRIP
 813 GNM
 814 NM
 815 STRIP
 816 MSBUILD
 817 DUMPBIN
 818 RC
 819 MT
 820 LIPO
 821 ac_ct_AR
 822 AR
 823 AS
 824 LDCXX
 825 LD
 826 CXXCPP
 827 CPP
 828 CXX_VERSION_NUMBER
 829 CC_VERSION_NUMBER
 830 ac_ct_CXX
 831 CXXFLAGS
 832 CXX
 833 TOOLCHAIN_PATH_CXX
 834 POTENTIAL_CXX
 835 OBJEXT
 836 EXEEXT
 837 ac_ct_CC
 838 CPPFLAGS
 839 LDFLAGS
 840 CFLAGS
 841 CC
 842 TOOLCHAIN_PATH_CC
 843 POTENTIAL_CC
 844 TOOLCHAIN_VERSION
 845 VS_LIB
 846 VS_INCLUDE
 847 VS_PATH
 848 CYGWIN_LINK
 849 SYSROOT_LDFLAGS
 850 SYSROOT_CFLAGS
 851 EXTRA_LDFLAGS
 852 EXTRA_CXXFLAGS
 853 EXTRA_CFLAGS
 854 EXE_SUFFIX
 855 OBJ_SUFFIX
 856 STATIC_LIBRARY
 857 SHARED_LIBRARY
 858 STATIC_LIBRARY_SUFFIX
 859 SHARED_LIBRARY_SUFFIX
 860 LIBRARY_PREFIX
 861 TOOLCHAIN_TYPE
 862 STATIC_BUILD
 863 IMPORT_MODULES_MAKE
 864 IMPORT_MODULES_SRC
 865 IMPORT_MODULES_MAN
 866 IMPORT_MODULES_LEGAL
 867 IMPORT_MODULES_CONF
 868 IMPORT_MODULES_LIBS
 869 IMPORT_MODULES_CMDS
 870 IMPORT_MODULES_CLASSES
 871 BUILD_OUTPUT
 872 JDK_TOPDIR
 873 NASHORN_TOPDIR
 874 HOTSPOT_TOPDIR
 875 JAXWS_TOPDIR
 876 JAXP_TOPDIR
 877 CORBA_TOPDIR
 878 LANGTOOLS_TOPDIR
 879 EXTERNAL_BUILDJDK
 880 BUILD_JDK
 881 CREATE_BUILDJDK
 882 JLINK
 883 JMOD
 884 JAVAC_FLAGS
 885 BOOT_JDK_MODULAR
 886 BOOT_JDK_SOURCETARGET
 887 JARSIGNER
 888 JAR
 889 JAVAH
 890 JAVAC
 891 JAVA
 892 BOOT_JDK
 893 JAVA_CHECK
 894 JAVAC_CHECK
 895 VERSION_IS_GA
 896 VERSION_SHORT
 897 VERSION_STRING
 898 VERSION_NUMBER_FOUR_POSITIONS
 899 VERSION_NUMBER
 900 VERSION_OPT
 901 VERSION_BUILD
 902 VERSION_PRE
 903 VERSION_PATCH
 904 VERSION_SECURITY
 905 VERSION_MINOR
 906 VERSION_MAJOR
 907 MACOSX_BUNDLE_ID_BASE
 908 MACOSX_BUNDLE_NAME_BASE
 909 HOTSPOT_VM_DISTRO
 910 COMPANY_NAME
 911 JDK_RC_PLATFORM_NAME
 912 PRODUCT_SUFFIX
 913 PRODUCT_NAME
 914 LAUNCHER_NAME
 915 JLINK_KEEP_PACKAGED_MODULES
 916 COPYRIGHT_YEAR
 917 COMPRESS_JARS
 918 INCLUDE_SA
 919 UNLIMITED_CRYPTO
 920 CACERTS_FILE
 921 ENABLE_HEADLESS_ONLY
 922 DEFAULT_MAKE_TARGET
 923 OS_VERSION_MICRO
 924 OS_VERSION_MINOR
 925 OS_VERSION_MAJOR
 926 PKG_CONFIG
 927 BASH_ARGS
 928 SETFILE
 929 CODESIGN
 930 XATTR
 931 DSYMUTIL
 932 IS_GNU_TIME
 933 PATCH
 934 DTRACE
 935 FLOCK
 936 TIME
 937 STAT
 938 HG
 939 READELF
 940 OTOOL
 941 LDD
 942 ZIPEXE
 943 UNZIP
 944 TAR_SUPPORTS_TRANSFORM
 945 TAR_INCLUDE_PARAM
 946 TAR_CREATE_EXTRA_PARAM
 947 TAR_TYPE
 948 FIND_DELETE
 949 OUTPUT_SYNC
 950 OUTPUT_SYNC_SUPPORTED
 951 CHECK_TOOLSDIR_MAKE
 952 CHECK_TOOLSDIR_GMAKE
 953 CHECK_MAKE
 954 CHECK_GMAKE
 955 MAKE
 956 PKGHANDLER
 957 CONFIGURESUPPORT_OUTPUTDIR
 958 OUTPUT_ROOT
 959 CONF_NAME
 960 SPEC
 961 SDKROOT
 962 XCODEBUILD
 963 JVM_VARIANT_MAIN
 964 VALID_JVM_VARIANTS
 965 JVM_VARIANTS
 966 DEBUG_LEVEL
 967 HOTSPOT_DEBUG_LEVEL
 968 JDK_VARIANT
 969 USERNAME
 970 CANONICAL_TOPDIR
 971 ORIGINAL_TOPDIR
 972 TOPDIR
 973 PATH_SEP
 974 HOTSPOT_BUILD_CPU_DEFINE
 975 HOTSPOT_BUILD_CPU_ARCH
 976 HOTSPOT_BUILD_CPU
 977 HOTSPOT_BUILD_OS_TYPE
 978 HOTSPOT_BUILD_OS
 979 OPENJDK_BUILD_BUNDLE_PLATFORM
 980 OPENJDK_BUILD_OS_EXPORT_DIR
 981 OPENJDK_BUILD_CPU_OSARCH
 982 OPENJDK_BUILD_CPU_ISADIR
 983 OPENJDK_BUILD_CPU_LEGACY_LIB
 984 OPENJDK_BUILD_CPU_LEGACY
 985 HOTSPOT_TARGET_CPU_DEFINE
 986 HOTSPOT_TARGET_CPU_ARCH
 987 HOTSPOT_TARGET_CPU
 988 HOTSPOT_TARGET_OS_TYPE
 989 HOTSPOT_TARGET_OS
 990 DEFINE_CROSS_COMPILE_ARCH
 991 OPENJDK_TARGET_BUNDLE_PLATFORM
 992 OPENJDK_TARGET_OS_EXPORT_DIR
 993 OPENJDK_TARGET_CPU_OSARCH
 994 OPENJDK_TARGET_CPU_ISADIR
 995 OPENJDK_TARGET_CPU_LEGACY_LIB
 996 OPENJDK_TARGET_CPU_LEGACY
 997 REQUIRED_OS_VERSION
 998 REQUIRED_OS_NAME
 999 COMPILE_TYPE
1000 OPENJDK_TARGET_CPU_ENDIAN
1001 OPENJDK_TARGET_CPU_BITS
1002 OPENJDK_TARGET_CPU_ARCH
1003 OPENJDK_TARGET_CPU
1004 OPENJDK_TARGET_OS_ENV
1005 OPENJDK_TARGET_OS_TYPE
1006 OPENJDK_TARGET_OS
1007 OPENJDK_BUILD_CPU_ENDIAN
1008 OPENJDK_BUILD_CPU_BITS
1009 OPENJDK_BUILD_CPU_ARCH
1010 OPENJDK_BUILD_CPU
1011 OPENJDK_BUILD_OS_ENV
1012 OPENJDK_BUILD_OS_TYPE
1013 OPENJDK_BUILD_OS
1014 OPENJDK_BUILD_AUTOCONF_NAME
1015 OPENJDK_TARGET_AUTOCONF_NAME
1016 target_os
1017 target_vendor
1018 target_cpu
1019 target
1020 host_os
1021 host_vendor
1022 host_cpu
1023 host
1024 build_os
1025 build_vendor
1026 build_cpu
1027 build
1028 PANDOC
1029 NICE
1030 CPIO
1031 DF
1032 READLINK
1033 CYGPATH
1034 SED
1035 FGREP
1036 EGREP
1037 GREP
1038 AWK
1039 XARGS
1040 WHICH
1041 WC
1042 UNIQ
1043 UNAME
1044 TR
1045 TOUCH
1046 TEE
1047 TAR
1048 TAIL
1049 SORT
1050 SH
1051 RMDIR
1052 RM
1053 PRINTF
1054 NAWK
1055 MV
1056 MKTEMP
1057 MKDIR
1058 LS
1059 LN
1060 GZIP
1061 GUNZIP
1062 HEAD
1063 FIND
1064 FILE
1065 EXPR
1066 ECHO
1067 DIRNAME
1068 DIFF
1069 DATE
1070 CUT
1071 CP
1072 COMM
1073 CMP
1074 CHMOD
1075 CAT
1076 BASH
1077 BASENAME
1078 DATE_WHEN_CONFIGURED
1079 ORIGINAL_PATH
1080 CONFIGURE_COMMAND_LINE
1081 target_alias
1082 host_alias
1083 build_alias
1084 LIBS
1085 ECHO_T
1086 ECHO_N
1087 ECHO_C
1088 DEFS
1089 mandir
1090 localedir
1091 libdir
1092 psdir
1093 pdfdir
1094 dvidir
1095 htmldir
1096 infodir
1097 docdir
1098 oldincludedir
1099 includedir
1100 localstatedir
1101 sharedstatedir
1102 sysconfdir
1103 datadir
1104 datarootdir
1105 libexecdir
1106 sbindir
1107 bindir
1108 program_transform_name
1109 prefix
1110 exec_prefix
1111 PACKAGE_URL
1112 PACKAGE_BUGREPORT
1113 PACKAGE_STRING
1114 PACKAGE_VERSION
1115 PACKAGE_TARNAME
1116 PACKAGE_NAME
1117 PATH_SEPARATOR
1118 SHELL'
1119 ac_subst_files=''
1120 ac_user_opts='
1121 enable_option_checking
1122 with_target_bits
1123 enable_openjdk_only
1124 with_custom_make_dir
1125 with_jdk_variant
1126 enable_debug
1127 with_debug_level
1128 with_jvm_variants
1129 with_cpu_port
1130 with_devkit
1131 with_sys_root
1132 with_sysroot
1133 with_tools_dir
1134 with_toolchain_path
1135 with_extra_path
1136 with_sdk_name
1137 with_conf_name
1138 with_output_sync
1139 with_default_make_target
1140 enable_headless_only
1141 with_cacerts_file
1142 enable_unlimited_crypto
1143 with_copyright_year
1144 enable_keep_packaged_modules
1145 with_milestone
1146 with_update_version
1147 with_user_release_suffix
1148 with_build_number
1149 with_version_string
1150 with_version_pre
1151 with_version_opt
1152 with_version_build
1153 with_version_major
1154 with_version_minor
1155 with_version_security
1156 with_version_patch
1157 with_boot_jdk
1158 with_build_jdk
1159 with_add_source_root
1160 with_override_source_root
1161 with_adds_and_overrides
1162 with_override_langtools
1163 with_override_corba
1164 with_override_jaxp
1165 with_override_jaxws
1166 with_override_hotspot
1167 with_override_nashorn
1168 with_override_jdk
1169 with_import_hotspot
1170 with_import_modules
1171 enable_static_build
1172 with_toolchain_type
1173 with_extra_cflags
1174 with_extra_cxxflags
1175 with_extra_ldflags
1176 with_toolchain_version
1177 with_build_devkit
1178 with_jtreg
1179 with_abi_profile
1180 enable_warnings_as_errors
1181 with_native_debug_symbols
1182 enable_debug_symbols
1183 enable_zip_debug_info
1184 enable_native_coverage
1185 enable_dtrace
1186 enable_aot
1187 enable_hotspot_gtest
1188 with_stdc__lib
1189 with_msvcr_dll
1190 with_msvcp_dll
1191 with_x
1192 with_cups
1193 with_cups_include
1194 with_freetype
1195 with_freetype_include
1196 with_freetype_lib
1197 with_freetype_src
1198 enable_freetype_bundling
1199 with_alsa
1200 with_alsa_include
1201 with_alsa_lib
1202 with_libffi
1203 with_libffi_include
1204 with_libffi_lib
1205 enable_libffi_bundling
1206 with_libjpeg
1207 with_giflib
1208 with_libpng
1209 with_zlib
1210 with_lcms
1211 with_dxsdk
1212 with_dxsdk_lib
1213 with_dxsdk_include
1214 with_libelf
1215 with_libelf_include
1216 with_libelf_lib
1217 with_jvm_features
1218 with_jvm_interpreter
1219 enable_jtreg_failure_handler
1220 enable_generate_classlist
1221 with_num_cores
1222 with_memory_size
1223 with_jobs
1224 with_test_jobs
1225 with_boot_jdk_jvmargs
1226 with_sjavac_server_java
1227 enable_sjavac
1228 enable_javac_server
1229 enable_icecc
1230 enable_precompiled_headers
1231 enable_ccache
1232 with_ccache_dir
1233 '
1234       ac_precious_vars='build_alias
1235 host_alias
1236 target_alias
1237 BASENAME
1238 BASH
1239 CAT
1240 CHMOD
1241 CMP
1242 COMM
1243 CP
1244 CUT
1245 DATE
1246 DIFF
1247 DIRNAME
1248 ECHO
1249 EXPR
1250 FILE
1251 FIND
1252 HEAD
1253 GUNZIP
1254 GZIP
1255 LN
1256 LS
1257 MKDIR
1258 MKTEMP
1259 MV
1260 NAWK
1261 PRINTF
1262 RM
1263 RMDIR
1264 SH
1265 SORT
1266 TAIL
1267 TAR
1268 TEE
1269 TOUCH
1270 TR
1271 UNAME
1272 UNIQ
1273 WC
1274 WHICH
1275 XARGS
1276 AWK
1277 GREP
1278 EGREP
1279 FGREP
1280 SED
1281 CYGPATH
1282 READLINK
1283 DF
1284 CPIO
1285 NICE
1286 PANDOC
1287 MAKE
1288 UNZIP
1289 ZIPEXE
1290 LDD
1291 OTOOL
1292 READELF
1293 HG
1294 STAT
1295 TIME
1296 FLOCK
1297 DTRACE
1298 PATCH
1299 DSYMUTIL
1300 XATTR
1301 CODESIGN
1302 SETFILE
1303 PKG_CONFIG
1304 JAVA
1305 JAVAC
1306 JAVAH
1307 JAR
1308 JARSIGNER
1309 CC
1310 CFLAGS
1311 LDFLAGS
1312 LIBS
1313 CPPFLAGS
1314 CXX
1315 CXXFLAGS
1316 CCC
1317 CPP
1318 CXXCPP
1319 AS
1320 AR
1321 LIPO
1322 STRIP
1323 NM
1324 GNM
1325 OBJCOPY
1326 OBJDUMP
1327 BUILD_CC
1328 BUILD_CXX
1329 BUILD_NM
1330 BUILD_AR
1331 BUILD_OBJCOPY
1332 BUILD_STRIP
1333 JTREGEXE
1334 XMKMF
1335 FREETYPE_CFLAGS
1336 FREETYPE_LIBS
1337 ALSA_CFLAGS
1338 ALSA_LIBS
1339 LIBFFI_CFLAGS
1340 LIBFFI_LIBS
1341 PNG_CFLAGS
1342 PNG_LIBS
1343 LCMS_CFLAGS
1344 LCMS_LIBS
1345 ELF_CFLAGS
1346 ELF_LIBS
1347 ICECC_CMD
1348 ICECC_CREATE_ENV
1349 ICECC_WRAPPER
1350 CCACHE'
1351 
1352 
1353 # Initialize some variables set by options.
1354 ac_init_help=
1355 ac_init_version=false
1356 ac_unrecognized_opts=
1357 ac_unrecognized_sep=
1358 # The variables have the same names as the options, with
1359 # dashes changed to underlines.
1360 cache_file=/dev/null
1361 exec_prefix=NONE
1362 no_create=
1363 no_recursion=
1364 prefix=NONE
1365 program_prefix=NONE
1366 program_suffix=NONE
1367 program_transform_name=s,x,x,
1368 silent=
1369 site=
1370 srcdir=
1371 verbose=
1372 x_includes=NONE
1373 x_libraries=NONE
1374 
1375 # Installation directory options.
1376 # These are left unexpanded so users can "make install exec_prefix=/foo"
1377 # and all the variables that are supposed to be based on exec_prefix
1378 # by default will actually change.
1379 # Use braces instead of parens because sh, perl, etc. also accept them.
1380 # (The list follows the same order as the GNU Coding Standards.)
1381 bindir='${exec_prefix}/bin'
1382 sbindir='${exec_prefix}/sbin'
1383 libexecdir='${exec_prefix}/libexec'
1384 datarootdir='${prefix}/share'
1385 datadir='${datarootdir}'
1386 sysconfdir='${prefix}/etc'
1387 sharedstatedir='${prefix}/com'
1388 localstatedir='${prefix}/var'
1389 includedir='${prefix}/include'
1390 oldincludedir='/usr/include'
1391 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1392 infodir='${datarootdir}/info'
1393 htmldir='${docdir}'
1394 dvidir='${docdir}'
1395 pdfdir='${docdir}'
1396 psdir='${docdir}'
1397 libdir='${exec_prefix}/lib'
1398 localedir='${datarootdir}/locale'
1399 mandir='${datarootdir}/man'
1400 
1401 ac_prev=
1402 ac_dashdash=
1403 for ac_option
1404 do
1405   # If the previous option needs an argument, assign it.
1406   if test -n "$ac_prev"; then
1407     eval $ac_prev=\$ac_option
1408     ac_prev=
1409     continue
1410   fi
1411 
1412   case $ac_option in
1413   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1414   *=)   ac_optarg= ;;
1415   *)    ac_optarg=yes ;;
1416   esac
1417 
1418   # Accept the important Cygnus configure options, so we can diagnose typos.
1419 
1420   case $ac_dashdash$ac_option in
1421   --)
1422     ac_dashdash=yes ;;
1423 
1424   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1425     ac_prev=bindir ;;
1426   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1427     bindir=$ac_optarg ;;
1428 
1429   -build | --build | --buil | --bui | --bu)
1430     ac_prev=build_alias ;;
1431   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1432     build_alias=$ac_optarg ;;
1433 
1434   -cache-file | --cache-file | --cache-fil | --cache-fi \
1435   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1436     ac_prev=cache_file ;;
1437   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1438   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1439     cache_file=$ac_optarg ;;
1440 
1441   --config-cache | -C)
1442     cache_file=config.cache ;;
1443 
1444   -datadir | --datadir | --datadi | --datad)
1445     ac_prev=datadir ;;
1446   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1447     datadir=$ac_optarg ;;
1448 
1449   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1450   | --dataroo | --dataro | --datar)
1451     ac_prev=datarootdir ;;
1452   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1453   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1454     datarootdir=$ac_optarg ;;
1455 
1456   -disable-* | --disable-*)
1457     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1458     # Reject names that are not valid shell variable names.
1459     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1460       as_fn_error $? "invalid feature name: $ac_useropt"
1461     ac_useropt_orig=$ac_useropt
1462     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1463     case $ac_user_opts in
1464       *"
1465 "enable_$ac_useropt"
1466 "*) ;;
1467       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1468          ac_unrecognized_sep=', ';;
1469     esac
1470     eval enable_$ac_useropt=no ;;
1471 
1472   -docdir | --docdir | --docdi | --doc | --do)
1473     ac_prev=docdir ;;
1474   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1475     docdir=$ac_optarg ;;
1476 
1477   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1478     ac_prev=dvidir ;;
1479   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1480     dvidir=$ac_optarg ;;
1481 
1482   -enable-* | --enable-*)
1483     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1484     # Reject names that are not valid shell variable names.
1485     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1486       as_fn_error $? "invalid feature name: $ac_useropt"
1487     ac_useropt_orig=$ac_useropt
1488     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1489     case $ac_user_opts in
1490       *"
1491 "enable_$ac_useropt"
1492 "*) ;;
1493       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1494          ac_unrecognized_sep=', ';;
1495     esac
1496     eval enable_$ac_useropt=\$ac_optarg ;;
1497 
1498   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1499   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1500   | --exec | --exe | --ex)
1501     ac_prev=exec_prefix ;;
1502   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1503   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1504   | --exec=* | --exe=* | --ex=*)
1505     exec_prefix=$ac_optarg ;;
1506 
1507   -gas | --gas | --ga | --g)
1508     # Obsolete; use --with-gas.
1509     with_gas=yes ;;
1510 
1511   -help | --help | --hel | --he | -h)
1512     ac_init_help=long ;;
1513   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1514     ac_init_help=recursive ;;
1515   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1516     ac_init_help=short ;;
1517 
1518   -host | --host | --hos | --ho)
1519     ac_prev=host_alias ;;
1520   -host=* | --host=* | --hos=* | --ho=*)
1521     host_alias=$ac_optarg ;;
1522 
1523   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1524     ac_prev=htmldir ;;
1525   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1526   | --ht=*)
1527     htmldir=$ac_optarg ;;
1528 
1529   -includedir | --includedir | --includedi | --included | --include \
1530   | --includ | --inclu | --incl | --inc)
1531     ac_prev=includedir ;;
1532   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1533   | --includ=* | --inclu=* | --incl=* | --inc=*)
1534     includedir=$ac_optarg ;;
1535 
1536   -infodir | --infodir | --infodi | --infod | --info | --inf)
1537     ac_prev=infodir ;;
1538   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1539     infodir=$ac_optarg ;;
1540 
1541   -libdir | --libdir | --libdi | --libd)
1542     ac_prev=libdir ;;
1543   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1544     libdir=$ac_optarg ;;
1545 
1546   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1547   | --libexe | --libex | --libe)
1548     ac_prev=libexecdir ;;
1549   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1550   | --libexe=* | --libex=* | --libe=*)
1551     libexecdir=$ac_optarg ;;
1552 
1553   -localedir | --localedir | --localedi | --localed | --locale)
1554     ac_prev=localedir ;;
1555   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1556     localedir=$ac_optarg ;;
1557 
1558   -localstatedir | --localstatedir | --localstatedi | --localstated \
1559   | --localstate | --localstat | --localsta | --localst | --locals)
1560     ac_prev=localstatedir ;;
1561   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1562   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1563     localstatedir=$ac_optarg ;;
1564 
1565   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1566     ac_prev=mandir ;;
1567   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1568     mandir=$ac_optarg ;;
1569 
1570   -nfp | --nfp | --nf)
1571     # Obsolete; use --without-fp.
1572     with_fp=no ;;
1573 
1574   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1575   | --no-cr | --no-c | -n)
1576     no_create=yes ;;
1577 
1578   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1579   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1580     no_recursion=yes ;;
1581 
1582   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1583   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1584   | --oldin | --oldi | --old | --ol | --o)
1585     ac_prev=oldincludedir ;;
1586   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1587   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1588   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1589     oldincludedir=$ac_optarg ;;
1590 
1591   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1592     ac_prev=prefix ;;
1593   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1594     prefix=$ac_optarg ;;
1595 
1596   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1597   | --program-pre | --program-pr | --program-p)
1598     ac_prev=program_prefix ;;
1599   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1600   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1601     program_prefix=$ac_optarg ;;
1602 
1603   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1604   | --program-suf | --program-su | --program-s)
1605     ac_prev=program_suffix ;;
1606   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1607   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1608     program_suffix=$ac_optarg ;;
1609 
1610   -program-transform-name | --program-transform-name \
1611   | --program-transform-nam | --program-transform-na \
1612   | --program-transform-n | --program-transform- \
1613   | --program-transform | --program-transfor \
1614   | --program-transfo | --program-transf \
1615   | --program-trans | --program-tran \
1616   | --progr-tra | --program-tr | --program-t)
1617     ac_prev=program_transform_name ;;
1618   -program-transform-name=* | --program-transform-name=* \
1619   | --program-transform-nam=* | --program-transform-na=* \
1620   | --program-transform-n=* | --program-transform-=* \
1621   | --program-transform=* | --program-transfor=* \
1622   | --program-transfo=* | --program-transf=* \
1623   | --program-trans=* | --program-tran=* \
1624   | --progr-tra=* | --program-tr=* | --program-t=*)
1625     program_transform_name=$ac_optarg ;;
1626 
1627   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1628     ac_prev=pdfdir ;;
1629   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1630     pdfdir=$ac_optarg ;;
1631 
1632   -psdir | --psdir | --psdi | --psd | --ps)
1633     ac_prev=psdir ;;
1634   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1635     psdir=$ac_optarg ;;
1636 
1637   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1638   | -silent | --silent | --silen | --sile | --sil)
1639     silent=yes ;;
1640 
1641   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1642     ac_prev=sbindir ;;
1643   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1644   | --sbi=* | --sb=*)
1645     sbindir=$ac_optarg ;;
1646 
1647   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1648   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1649   | --sharedst | --shareds | --shared | --share | --shar \
1650   | --sha | --sh)
1651     ac_prev=sharedstatedir ;;
1652   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1653   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1654   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1655   | --sha=* | --sh=*)
1656     sharedstatedir=$ac_optarg ;;
1657 
1658   -site | --site | --sit)
1659     ac_prev=site ;;
1660   -site=* | --site=* | --sit=*)
1661     site=$ac_optarg ;;
1662 
1663   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1664     ac_prev=srcdir ;;
1665   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1666     srcdir=$ac_optarg ;;
1667 
1668   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1669   | --syscon | --sysco | --sysc | --sys | --sy)
1670     ac_prev=sysconfdir ;;
1671   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1672   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1673     sysconfdir=$ac_optarg ;;
1674 
1675   -target | --target | --targe | --targ | --tar | --ta | --t)
1676     ac_prev=target_alias ;;
1677   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1678     target_alias=$ac_optarg ;;
1679 
1680   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1681     verbose=yes ;;
1682 
1683   -version | --version | --versio | --versi | --vers | -V)
1684     ac_init_version=: ;;
1685 
1686   -with-* | --with-*)
1687     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1688     # Reject names that are not valid shell variable names.
1689     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1690       as_fn_error $? "invalid package name: $ac_useropt"
1691     ac_useropt_orig=$ac_useropt
1692     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1693     case $ac_user_opts in
1694       *"
1695 "with_$ac_useropt"
1696 "*) ;;
1697       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1698          ac_unrecognized_sep=', ';;
1699     esac
1700     eval with_$ac_useropt=\$ac_optarg ;;
1701 
1702   -without-* | --without-*)
1703     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1704     # Reject names that are not valid shell variable names.
1705     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1706       as_fn_error $? "invalid package name: $ac_useropt"
1707     ac_useropt_orig=$ac_useropt
1708     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1709     case $ac_user_opts in
1710       *"
1711 "with_$ac_useropt"
1712 "*) ;;
1713       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1714          ac_unrecognized_sep=', ';;
1715     esac
1716     eval with_$ac_useropt=no ;;
1717 
1718   --x)
1719     # Obsolete; use --with-x.
1720     with_x=yes ;;
1721 
1722   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1723   | --x-incl | --x-inc | --x-in | --x-i)
1724     ac_prev=x_includes ;;
1725   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1726   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1727     x_includes=$ac_optarg ;;
1728 
1729   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1730   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1731     ac_prev=x_libraries ;;
1732   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1733   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1734     x_libraries=$ac_optarg ;;
1735 
1736   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1737 Try \`$0 --help' for more information"
1738     ;;
1739 
1740   *=*)
1741     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1742     # Reject names that are not valid shell variable names.
1743     case $ac_envvar in #(
1744       '' | [0-9]* | *[!_$as_cr_alnum]* )
1745       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1746     esac
1747     eval $ac_envvar=\$ac_optarg
1748     export $ac_envvar ;;
1749 
1750   *)
1751     # FIXME: should be removed in autoconf 3.0.
1752     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1753     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1754       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1755     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1756     ;;
1757 
1758   esac
1759 done
1760 
1761 if test -n "$ac_prev"; then
1762   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1763   as_fn_error $? "missing argument to $ac_option"
1764 fi
1765 
1766 if test -n "$ac_unrecognized_opts"; then
1767   case $enable_option_checking in
1768     no) ;;
1769     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1770     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1771   esac
1772 fi
1773 
1774 # Check all directory arguments for consistency.
1775 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1776                 datadir sysconfdir sharedstatedir localstatedir includedir \
1777                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1778                 libdir localedir mandir
1779 do
1780   eval ac_val=\$$ac_var
1781   # Remove trailing slashes.
1782   case $ac_val in
1783     */ )
1784       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1785       eval $ac_var=\$ac_val;;
1786   esac
1787   # Be sure to have absolute directory names.
1788   case $ac_val in
1789     [\\/$]* | ?:[\\/]* )  continue;;
1790     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1791   esac
1792   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1793 done
1794 
1795 # There might be people who depend on the old broken behavior: `$host'
1796 # used to hold the argument of --host etc.
1797 # FIXME: To remove some day.
1798 build=$build_alias
1799 host=$host_alias
1800 target=$target_alias
1801 
1802 # FIXME: To remove some day.
1803 if test "x$host_alias" != x; then
1804   if test "x$build_alias" = x; then
1805     cross_compiling=maybe
1806   elif test "x$build_alias" != "x$host_alias"; then
1807     cross_compiling=yes
1808   fi
1809 fi
1810 
1811 ac_tool_prefix=
1812 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1813 
1814 test "$silent" = yes && exec 6>/dev/null
1815 
1816 
1817 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1818 ac_ls_di=`ls -di .` &&
1819 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1820   as_fn_error $? "working directory cannot be determined"
1821 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1822   as_fn_error $? "pwd does not report name of working directory"
1823 
1824 
1825 # Find the source files, if location was not specified.
1826 if test -z "$srcdir"; then
1827   ac_srcdir_defaulted=yes
1828   # Try the directory containing this script, then the parent directory.
1829   ac_confdir=`$as_dirname -- "$as_myself" ||
1830 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1831          X"$as_myself" : 'X\(//\)[^/]' \| \
1832          X"$as_myself" : 'X\(//\)$' \| \
1833          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1834 $as_echo X"$as_myself" |
1835     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1836             s//\1/
1837             q
1838           }
1839           /^X\(\/\/\)[^/].*/{
1840             s//\1/
1841             q
1842           }
1843           /^X\(\/\/\)$/{
1844             s//\1/
1845             q
1846           }
1847           /^X\(\/\).*/{
1848             s//\1/
1849             q
1850           }
1851           s/.*/./; q'`
1852   srcdir=$ac_confdir
1853   if test ! -r "$srcdir/$ac_unique_file"; then
1854     srcdir=..
1855   fi
1856 else
1857   ac_srcdir_defaulted=no
1858 fi
1859 if test ! -r "$srcdir/$ac_unique_file"; then
1860   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1861   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1862 fi
1863 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1864 ac_abs_confdir=`(
1865         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1866         pwd)`
1867 # When building in place, set srcdir=.
1868 if test "$ac_abs_confdir" = "$ac_pwd"; then
1869   srcdir=.
1870 fi
1871 # Remove unnecessary trailing slashes from srcdir.
1872 # Double slashes in file names in object file debugging info
1873 # mess up M-x gdb in Emacs.
1874 case $srcdir in
1875 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1876 esac
1877 for ac_var in $ac_precious_vars; do
1878   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1879   eval ac_env_${ac_var}_value=\$${ac_var}
1880   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1881   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1882 done
1883 
1884 #
1885 # Report the --help message.
1886 #
1887 if test "$ac_init_help" = "long"; then
1888   # Omit some internal or obsolete options to make the list less imposing.
1889   # This message is too long to be a string in the A/UX 3.1 sh.
1890   cat <<_ACEOF
1891 \`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1892 
1893 Usage: $0 [OPTION]... [VAR=VALUE]...
1894 
1895 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1896 VAR=VALUE.  See below for descriptions of some of the useful variables.
1897 
1898 Defaults for the options are specified in brackets.
1899 
1900 Configuration:
1901   -h, --help              display this help and exit
1902       --help=short        display options specific to this package
1903       --help=recursive    display the short help of all the included packages
1904   -V, --version           display version information and exit
1905   -q, --quiet, --silent   do not print \`checking ...' messages
1906       --cache-file=FILE   cache test results in FILE [disabled]
1907   -C, --config-cache      alias for \`--cache-file=config.cache'
1908   -n, --no-create         do not create output files
1909       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1910 
1911 Installation directories:
1912   --prefix=PREFIX         install architecture-independent files in PREFIX
1913                           [$ac_default_prefix]
1914   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1915                           [PREFIX]
1916 
1917 By default, \`make install' will install all the files in
1918 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1919 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1920 for instance \`--prefix=\$HOME'.
1921 
1922 For better control, use the options below.
1923 
1924 Fine tuning of the installation directories:
1925   --bindir=DIR            user executables [EPREFIX/bin]
1926   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1927   --libexecdir=DIR        program executables [EPREFIX/libexec]
1928   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1929   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1930   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1931   --libdir=DIR            object code libraries [EPREFIX/lib]
1932   --includedir=DIR        C header files [PREFIX/include]
1933   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1934   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1935   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1936   --infodir=DIR           info documentation [DATAROOTDIR/info]
1937   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1938   --mandir=DIR            man documentation [DATAROOTDIR/man]
1939   --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1940   --htmldir=DIR           html documentation [DOCDIR]
1941   --dvidir=DIR            dvi documentation [DOCDIR]
1942   --pdfdir=DIR            pdf documentation [DOCDIR]
1943   --psdir=DIR             ps documentation [DOCDIR]
1944 _ACEOF
1945 
1946   cat <<\_ACEOF
1947 
1948 X features:
1949   --x-includes=DIR    X include files are in DIR
1950   --x-libraries=DIR   X library files are in DIR
1951 
1952 System types:
1953   --build=BUILD     configure for building on BUILD [guessed]
1954   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1955   --target=TARGET   configure for building compilers for TARGET [HOST]
1956 _ACEOF
1957 fi
1958 
1959 if test -n "$ac_init_help"; then
1960   case $ac_init_help in
1961      short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1962    esac
1963   cat <<\_ACEOF
1964 
1965 Optional Features:
1966   --disable-option-checking  ignore unrecognized --enable/--with options
1967   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1968   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1969   --enable-openjdk-only   suppress building custom source even if present
1970                           [disabled]
1971   --enable-debug          set the debug level to fastdebug (shorthand for
1972                           --with-debug-level=fastdebug) [disabled]
1973   --enable-headless-only  only build headless (no GUI) support [disabled]
1974   --disable-unlimited-crypto
1975                           Disable unlimited crypto policy [enabled]
1976   --disable-keep-packaged-modules
1977                           Do not keep packaged modules in jdk image [enable]
1978   --enable-static-build   enable static library build [disabled]
1979   --disable-warnings-as-errors
1980                           do not consider native warnings to be an error
1981                           [enabled]
1982   --enable-debug-symbols  Deprecated. Option is kept for backwards
1983                           compatibility and is ignored
1984   --enable-zip-debug-info Deprecated. Option is kept for backwards
1985                           compatibility and is ignored
1986   --enable-native-coverage
1987                           enable native compilation with code coverage
1988                           data[disabled]
1989   --enable-dtrace[=yes/no/auto]
1990                           enable dtrace. Default is auto, where dtrace is
1991                           enabled if all dependencies are present.
1992   --enable-aot[=yes/no/auto]
1993                           enable ahead of time compilation feature. Default is
1994                           auto, where aot is enabled if all dependencies are
1995                           present.
1996   --disable-hotspot-gtest Disables building of the Hotspot unit tests
1997   --disable-freetype-bundling
1998                           disable bundling of the freetype library with the
1999                           build result [enabled on Windows or when using
2000                           --with-freetype, disabled otherwise]
2001   --enable-libffi-bundling
2002                           enable bundling of libffi.so to make the built JDK
2003                           runnable on more systems
2004   --enable-jtreg-failure-handler
2005                           forces build of the jtreg failure handler to be
2006                           enabled, missing dependencies become fatal errors.
2007                           Default is auto, where the failure handler is built
2008                           if all dependencies are present and otherwise just
2009                           disabled.
2010   --disable-generate-classlist
2011                           forces enabling or disabling of the generation of a
2012                           CDS classlist at build time. Default is to generate
2013                           it when either the server or client JVMs are built.
2014   --enable-sjavac         use sjavac to do fast incremental compiles
2015                           [disabled]
2016   --disable-javac-server  disable javac server [enabled]
2017   --enable-icecc          enable distribted compilation of native code using
2018                           icecc/icecream [disabled]
2019   --disable-precompiled-headers
2020                           disable using precompiled headers when compiling C++
2021                           [enabled]
2022   --enable-ccache         enable using ccache to speed up recompilations
2023                           [disabled]
2024 
2025 Optional Packages:
2026   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2027   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2028   --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2029                           support it), e.g. --with-target-bits=32 [guessed]
2030   --with-custom-make-dir  Deprecated. Option is kept for backwards
2031                           compatibility and is ignored
2032   --with-jdk-variant      JDK variant to build (normal) [normal]
2033   --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2034                           optimized) [release]
2035   --with-jvm-variants     JVM variants (separated by commas) to build
2036                           (server,client,minimal,core,zero,zeroshark,custom)
2037                           [server]
2038   --with-cpu-port         specify sources to use for Hotspot 64-bit ARM port
2039                           (arm64,aarch64) [aarch64]
2040   --with-devkit           use this devkit for compilers, tools and resources
2041   --with-sys-root         alias for --with-sysroot for backwards compatability
2042   --with-sysroot          use this directory as sysroot
2043   --with-tools-dir        alias for --with-toolchain-path for backwards
2044                           compatibility
2045   --with-toolchain-path   prepend these directories when searching for
2046                           toolchain binaries (compilers etc)
2047   --with-extra-path       prepend these directories to the default path
2048   --with-sdk-name         use the platform SDK of the given name. [macosx]
2049   --with-conf-name        use this as the name of the configuration [generated
2050                           from important configuration options]
2051   --with-output-sync      set make output sync type if supported by make.
2052                           [recurse]
2053   --with-default-make-target
2054                           set the default make target [exploded-image]
2055   --with-cacerts-file     specify alternative cacerts file
2056   --with-copyright-year   Set copyright year value for build [current year]
2057   --with-milestone        Deprecated. Option is kept for backwards
2058                           compatibility and is ignored
2059   --with-update-version   Deprecated. Option is kept for backwards
2060                           compatibility and is ignored
2061   --with-user-release-suffix
2062                           Deprecated. Option is kept for backwards
2063                           compatibility and is ignored
2064   --with-build-number     Deprecated. Option is kept for backwards
2065                           compatibility and is ignored
2066   --with-version-string   Set version string [calculated]
2067   --with-version-pre      Set the base part of the version 'PRE' field
2068                           (pre-release identifier) ['internal']
2069   --with-version-opt      Set version 'OPT' field (build metadata)
2070                           [<timestamp>.<user>.<dirname>]
2071   --with-version-build    Set version 'BUILD' field (build number) [not
2072                           specified]
2073   --with-version-major    Set version 'MAJOR' field (first number) [current
2074                           source value]
2075   --with-version-minor    Set version 'MINOR' field (second number) [current
2076                           source value]
2077   --with-version-security Set version 'SECURITY' field (third number) [current
2078                           source value]
2079   --with-version-patch    Set version 'PATCH' field (fourth number) [not
2080                           specified]
2081   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2082   --with-build-jdk        path to JDK of same version as is being built[the
2083                           newly built JDK]
2084   --with-add-source-root  Deprecated. Option is kept for backwards
2085                           compatibility and is ignored
2086   --with-override-source-root
2087                           Deprecated. Option is kept for backwards
2088                           compatibility and is ignored
2089   --with-adds-and-overrides
2090                           Deprecated. Option is kept for backwards
2091                           compatibility and is ignored
2092   --with-override-langtools
2093                           Deprecated. Option is kept for backwards
2094                           compatibility and is ignored
2095   --with-override-corba   Deprecated. Option is kept for backwards
2096                           compatibility and is ignored
2097   --with-override-jaxp    Deprecated. Option is kept for backwards
2098                           compatibility and is ignored
2099   --with-override-jaxws   Deprecated. Option is kept for backwards
2100                           compatibility and is ignored
2101   --with-override-hotspot Deprecated. Option is kept for backwards
2102                           compatibility and is ignored
2103   --with-override-nashorn Deprecated. Option is kept for backwards
2104                           compatibility and is ignored
2105   --with-override-jdk     Deprecated. Option is kept for backwards
2106                           compatibility and is ignored
2107   --with-import_hotspot   Deprecated. Option is kept for backwards
2108                           compatibility and is ignored
2109   --with-import-modules   import a set of prebuilt modules either as a zip
2110                           file or an exploded directory
2111   --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2112                           to show possible values [platform dependent]
2113   --with-extra-cflags     extra flags to be used when compiling jdk c-files
2114   --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2115   --with-extra-ldflags    extra flags to be used when linking jdk
2116   --with-toolchain-version
2117                           the version of the toolchain to look for, use
2118                           '--help' to show possible values [platform
2119                           dependent]
2120   --with-build-devkit     Devkit to use for the build platform toolchain
2121   --with-jtreg            Regression Test Harness [probed]
2122   --with-abi-profile      specify ABI profile for ARM builds
2123                           (arm-vfp-sflt,arm-vfp-hflt,arm-sflt,
2124                           armv5-vfp-sflt,armv6-vfp-hflt,arm64,aarch64)
2125                           [toolchain dependent]
2126   --with-native-debug-symbols
2127                           set the native debug symbol configuration (none,
2128                           internal, external, zipped) [varying]
2129   --with-stdc++lib=<static>,<dynamic>,<default>
2130                           force linking of the C++ runtime on Linux to either
2131                           static or dynamic, default is static with dynamic as
2132                           fallback
2133   --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2134                           (Windows only) [probed]
2135   --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2136                           (Windows only) [probed]
2137   --with-x                use the X Window System
2138   --with-cups             specify prefix directory for the cups package
2139                           (expecting the headers under PATH/include)
2140   --with-cups-include     specify directory for the cups include files
2141   --with-freetype         specify prefix directory for the freetype package
2142                           (expecting the libraries under PATH/lib and the
2143                           headers under PATH/include)
2144   --with-freetype-include specify directory for the freetype include files
2145   --with-freetype-lib     specify directory for the freetype library
2146   --with-freetype-src     specify directory with freetype sources to
2147                           automatically build the library (experimental,
2148                           Windows-only)
2149   --with-alsa             specify prefix directory for the alsa package
2150                           (expecting the libraries under PATH/lib and the
2151                           headers under PATH/include)
2152   --with-alsa-include     specify directory for the alsa include files
2153   --with-alsa-lib         specify directory for the alsa library
2154   --with-libffi           specify prefix directory for the libffi package
2155                           (expecting the libraries under PATH/lib and the
2156                           headers under PATH/include)
2157   --with-libffi-include   specify directory for the libffi include files
2158   --with-libffi-lib       specify directory for the libffi library
2159   --with-libjpeg          use libjpeg from build system or OpenJDK source
2160                           (system, bundled) [bundled]
2161   --with-giflib           use giflib from build system or OpenJDK source
2162                           (system, bundled) [bundled]
2163   --with-libpng           use libpng from build system or OpenJDK source
2164                           (system, bundled) [bundled]
2165   --with-zlib             use zlib from build system or OpenJDK source
2166                           (system, bundled) [bundled]
2167   --with-lcms             use lcms2 from build system or OpenJDK source
2168                           (system, bundled) [bundled]
2169   --with-dxsdk            Deprecated. Option is kept for backwards
2170                           compatibility and is ignored
2171   --with-dxsdk-lib        Deprecated. Option is kept for backwards
2172                           compatibility and is ignored
2173   --with-dxsdk-include    Deprecated. Option is kept for backwards
2174                           compatibility and is ignored
2175   --with-libelf           specify prefix directory for the libelf package
2176                           (expecting the libraries under PATH/lib and the
2177                           headers under PATH/include)
2178   --with-libelf-include   specify directory for the libelf include files
2179   --with-libelf-lib       specify directory for the libelf library
2180   --with-jvm-features     additional JVM features to enable (separated by
2181                           comma), use '--help' to show possible values [none]
2182   --with-jvm-interpreter  Deprecated. Option is kept for backwards
2183                           compatibility and is ignored
2184   --with-num-cores        number of cores in the build system, e.g.
2185                           --with-num-cores=8 [probed]
2186   --with-memory-size      memory (in MB) available in the build system, e.g.
2187                           --with-memory-size=1024 [probed]
2188   --with-jobs             number of parallel jobs to let make run [calculated
2189                           based on cores and memory]
2190   --with-test-jobs        number of parallel tests jobs to run [based on build
2191                           jobs]
2192   --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2193                           invocations of boot JDK, overriding the default
2194                           values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2195                           -enableassertions"
2196   --with-sjavac-server-java
2197                           use this java binary for running the sjavac
2198                           background server [Boot JDK java]
2199   --with-ccache-dir       where to store ccache files [~/.ccache]
2200 
2201 Some influential environment variables:
2202   BASENAME    Override default value for BASENAME
2203   BASH        Override default value for BASH
2204   CAT         Override default value for CAT
2205   CHMOD       Override default value for CHMOD
2206   CMP         Override default value for CMP
2207   COMM        Override default value for COMM
2208   CP          Override default value for CP
2209   CUT         Override default value for CUT
2210   DATE        Override default value for DATE
2211   DIFF        Override default value for DIFF
2212   DIRNAME     Override default value for DIRNAME
2213   ECHO        Override default value for ECHO
2214   EXPR        Override default value for EXPR
2215   FILE        Override default value for FILE
2216   FIND        Override default value for FIND
2217   HEAD        Override default value for HEAD
2218   GUNZIP      Override default value for GUNZIP
2219   GZIP        Override default value for GZIP
2220   LN          Override default value for LN
2221   LS          Override default value for LS
2222   MKDIR       Override default value for MKDIR
2223   MKTEMP      Override default value for MKTEMP
2224   MV          Override default value for MV
2225   NAWK        Override default value for NAWK
2226   PRINTF      Override default value for PRINTF
2227   RM          Override default value for RM
2228   RMDIR       Override default value for RMDIR
2229   SH          Override default value for SH
2230   SORT        Override default value for SORT
2231   TAIL        Override default value for TAIL
2232   TAR         Override default value for TAR
2233   TEE         Override default value for TEE
2234   TOUCH       Override default value for TOUCH
2235   TR          Override default value for TR
2236   UNAME       Override default value for UNAME
2237   UNIQ        Override default value for UNIQ
2238   WC          Override default value for WC
2239   WHICH       Override default value for WHICH
2240   XARGS       Override default value for XARGS
2241   AWK         Override default value for AWK
2242   GREP        Override default value for GREP
2243   EGREP       Override default value for EGREP
2244   FGREP       Override default value for FGREP
2245   SED         Override default value for SED
2246   CYGPATH     Override default value for CYGPATH
2247   READLINK    Override default value for READLINK
2248   DF          Override default value for DF
2249   CPIO        Override default value for CPIO
2250   NICE        Override default value for NICE
2251   PANDOC      Override default value for PANDOC
2252   MAKE        Override default value for MAKE
2253   UNZIP       Override default value for UNZIP
2254   ZIPEXE      Override default value for ZIPEXE
2255   LDD         Override default value for LDD
2256   OTOOL       Override default value for OTOOL
2257   READELF     Override default value for READELF
2258   HG          Override default value for HG
2259   STAT        Override default value for STAT
2260   TIME        Override default value for TIME
2261   FLOCK       Override default value for FLOCK
2262   DTRACE      Override default value for DTRACE
2263   PATCH       Override default value for PATCH
2264   DSYMUTIL    Override default value for DSYMUTIL
2265   XATTR       Override default value for XATTR
2266   CODESIGN    Override default value for CODESIGN
2267   SETFILE     Override default value for SETFILE
2268   PKG_CONFIG  path to pkg-config utility
2269   JAVA        Override default value for JAVA
2270   JAVAC       Override default value for JAVAC
2271   JAVAH       Override default value for JAVAH
2272   JAR         Override default value for JAR
2273   JARSIGNER   Override default value for JARSIGNER
2274   CC          C compiler command
2275   CFLAGS      C compiler flags
2276   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2277               nonstandard directory <lib dir>
2278   LIBS        libraries to pass to the linker, e.g. -l<library>
2279   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2280               you have headers in a nonstandard directory <include dir>
2281   CXX         C++ compiler command
2282   CXXFLAGS    C++ compiler flags
2283   CPP         C preprocessor
2284   CXXCPP      C++ preprocessor
2285   AS          Override default value for AS
2286   AR          Override default value for AR
2287   LIPO        Override default value for LIPO
2288   STRIP       Override default value for STRIP
2289   NM          Override default value for NM
2290   GNM         Override default value for GNM
2291   OBJCOPY     Override default value for OBJCOPY
2292   OBJDUMP     Override default value for OBJDUMP
2293   BUILD_CC    Override default value for BUILD_CC
2294   BUILD_CXX   Override default value for BUILD_CXX
2295   BUILD_NM    Override default value for BUILD_NM
2296   BUILD_AR    Override default value for BUILD_AR
2297   BUILD_OBJCOPY
2298               Override default value for BUILD_OBJCOPY
2299   BUILD_STRIP Override default value for BUILD_STRIP
2300   JTREGEXE    Override default value for JTREGEXE
2301   XMKMF       Path to xmkmf, Makefile generator for X Window System
2302   FREETYPE_CFLAGS
2303               C compiler flags for FREETYPE, overriding pkg-config
2304   FREETYPE_LIBS
2305               linker flags for FREETYPE, overriding pkg-config
2306   ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2307   ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2308   LIBFFI_CFLAGS
2309               C compiler flags for LIBFFI, overriding pkg-config
2310   LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2311   PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2312   PNG_LIBS    linker flags for PNG, overriding pkg-config
2313   LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2314   LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2315   ELF_CFLAGS  C compiler flags for ELF, overriding pkg-config
2316   ELF_LIBS    linker flags for ELF, overriding pkg-config
2317   ICECC_CMD   Override default value for ICECC_CMD
2318   ICECC_CREATE_ENV
2319               Override default value for ICECC_CREATE_ENV
2320   ICECC_WRAPPER
2321               Override default value for ICECC_WRAPPER
2322   CCACHE      Override default value for CCACHE
2323 
2324 Use these variables to override the choices made by `configure' or to help
2325 it to find libraries and programs with nonstandard names/locations.
2326 
2327 Report bugs to <build-dev@openjdk.java.net>.
2328 OpenJDK home page: <http://openjdk.java.net>.
2329 _ACEOF
2330 ac_status=$?
2331 fi
2332 
2333 if test "$ac_init_help" = "recursive"; then
2334   # If there are subdirs, report their specific --help.
2335   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2336     test -d "$ac_dir" ||
2337       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2338       continue
2339     ac_builddir=.
2340 
2341 case "$ac_dir" in
2342 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2343 *)
2344   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2345   # A ".." for each directory in $ac_dir_suffix.
2346   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2347   case $ac_top_builddir_sub in
2348   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2349   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2350   esac ;;
2351 esac
2352 ac_abs_top_builddir=$ac_pwd
2353 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2354 # for backward compatibility:
2355 ac_top_builddir=$ac_top_build_prefix
2356 
2357 case $srcdir in
2358   .)  # We are building in place.
2359     ac_srcdir=.
2360     ac_top_srcdir=$ac_top_builddir_sub
2361     ac_abs_top_srcdir=$ac_pwd ;;
2362   [\\/]* | ?:[\\/]* )  # Absolute name.
2363     ac_srcdir=$srcdir$ac_dir_suffix;
2364     ac_top_srcdir=$srcdir
2365     ac_abs_top_srcdir=$srcdir ;;
2366   *) # Relative name.
2367     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2368     ac_top_srcdir=$ac_top_build_prefix$srcdir
2369     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2370 esac
2371 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2372 
2373     cd "$ac_dir" || { ac_status=$?; continue; }
2374     # Check for guested configure.
2375     if test -f "$ac_srcdir/configure.gnu"; then
2376       echo &&
2377       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2378     elif test -f "$ac_srcdir/configure"; then
2379       echo &&
2380       $SHELL "$ac_srcdir/configure" --help=recursive
2381     else
2382       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2383     fi || ac_status=$?
2384     cd "$ac_pwd" || { ac_status=$?; break; }
2385   done
2386 fi
2387 
2388 test -n "$ac_init_help" && exit $ac_status
2389 if $ac_init_version; then
2390   cat <<\_ACEOF
2391 OpenJDK configure jdk9
2392 generated by GNU Autoconf 2.69
2393 
2394 Copyright (C) 2012 Free Software Foundation, Inc.
2395 This configure script is free software; the Free Software Foundation
2396 gives unlimited permission to copy, distribute and modify it.
2397 _ACEOF
2398   exit
2399 fi
2400 
2401 ## ------------------------ ##
2402 ## Autoconf initialization. ##
2403 ## ------------------------ ##
2404 
2405 # ac_fn_c_try_compile LINENO
2406 # --------------------------
2407 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2408 ac_fn_c_try_compile ()
2409 {
2410   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2411   rm -f conftest.$ac_objext
2412   if { { ac_try="$ac_compile"
2413 case "(($ac_try" in
2414   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2415   *) ac_try_echo=$ac_try;;
2416 esac
2417 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2418 $as_echo "$ac_try_echo"; } >&5
2419   (eval "$ac_compile") 2>conftest.err
2420   ac_status=$?
2421   if test -s conftest.err; then
2422     grep -v '^ *+' conftest.err >conftest.er1
2423     cat conftest.er1 >&5
2424     mv -f conftest.er1 conftest.err
2425   fi
2426   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2427   test $ac_status = 0; } && {
2428          test -z "$ac_c_werror_flag" ||
2429          test ! -s conftest.err
2430        } && test -s conftest.$ac_objext; then :
2431   ac_retval=0
2432 else
2433   $as_echo "$as_me: failed program was:" >&5
2434 sed 's/^/| /' conftest.$ac_ext >&5
2435 
2436         ac_retval=1
2437 fi
2438   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2439   as_fn_set_status $ac_retval
2440 
2441 } # ac_fn_c_try_compile
2442 
2443 # ac_fn_cxx_try_compile LINENO
2444 # ----------------------------
2445 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2446 ac_fn_cxx_try_compile ()
2447 {
2448   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2449   rm -f conftest.$ac_objext
2450   if { { ac_try="$ac_compile"
2451 case "(($ac_try" in
2452   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2453   *) ac_try_echo=$ac_try;;
2454 esac
2455 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2456 $as_echo "$ac_try_echo"; } >&5
2457   (eval "$ac_compile") 2>conftest.err
2458   ac_status=$?
2459   if test -s conftest.err; then
2460     grep -v '^ *+' conftest.err >conftest.er1
2461     cat conftest.er1 >&5
2462     mv -f conftest.er1 conftest.err
2463   fi
2464   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2465   test $ac_status = 0; } && {
2466          test -z "$ac_cxx_werror_flag" ||
2467          test ! -s conftest.err
2468        } && test -s conftest.$ac_objext; then :
2469   ac_retval=0
2470 else
2471   $as_echo "$as_me: failed program was:" >&5
2472 sed 's/^/| /' conftest.$ac_ext >&5
2473 
2474         ac_retval=1
2475 fi
2476   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2477   as_fn_set_status $ac_retval
2478 
2479 } # ac_fn_cxx_try_compile
2480 
2481 # ac_fn_c_try_cpp LINENO
2482 # ----------------------
2483 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2484 ac_fn_c_try_cpp ()
2485 {
2486   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2487   if { { ac_try="$ac_cpp conftest.$ac_ext"
2488 case "(($ac_try" in
2489   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2490   *) ac_try_echo=$ac_try;;
2491 esac
2492 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2493 $as_echo "$ac_try_echo"; } >&5
2494   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2495   ac_status=$?
2496   if test -s conftest.err; then
2497     grep -v '^ *+' conftest.err >conftest.er1
2498     cat conftest.er1 >&5
2499     mv -f conftest.er1 conftest.err
2500   fi
2501   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2502   test $ac_status = 0; } > conftest.i && {
2503          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2504          test ! -s conftest.err
2505        }; then :
2506   ac_retval=0
2507 else
2508   $as_echo "$as_me: failed program was:" >&5
2509 sed 's/^/| /' conftest.$ac_ext >&5
2510 
2511     ac_retval=1
2512 fi
2513   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2514   as_fn_set_status $ac_retval
2515 
2516 } # ac_fn_c_try_cpp
2517 
2518 # ac_fn_cxx_try_cpp LINENO
2519 # ------------------------
2520 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2521 ac_fn_cxx_try_cpp ()
2522 {
2523   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2524   if { { ac_try="$ac_cpp conftest.$ac_ext"
2525 case "(($ac_try" in
2526   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2527   *) ac_try_echo=$ac_try;;
2528 esac
2529 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2530 $as_echo "$ac_try_echo"; } >&5
2531   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2532   ac_status=$?
2533   if test -s conftest.err; then
2534     grep -v '^ *+' conftest.err >conftest.er1
2535     cat conftest.er1 >&5
2536     mv -f conftest.er1 conftest.err
2537   fi
2538   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2539   test $ac_status = 0; } > conftest.i && {
2540          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2541          test ! -s conftest.err
2542        }; then :
2543   ac_retval=0
2544 else
2545   $as_echo "$as_me: failed program was:" >&5
2546 sed 's/^/| /' conftest.$ac_ext >&5
2547 
2548     ac_retval=1
2549 fi
2550   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2551   as_fn_set_status $ac_retval
2552 
2553 } # ac_fn_cxx_try_cpp
2554 
2555 # ac_fn_c_try_link LINENO
2556 # -----------------------
2557 # Try to link conftest.$ac_ext, and return whether this succeeded.
2558 ac_fn_c_try_link ()
2559 {
2560   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2561   rm -f conftest.$ac_objext conftest$ac_exeext
2562   if { { ac_try="$ac_link"
2563 case "(($ac_try" in
2564   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2565   *) ac_try_echo=$ac_try;;
2566 esac
2567 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2568 $as_echo "$ac_try_echo"; } >&5
2569   (eval "$ac_link") 2>conftest.err
2570   ac_status=$?
2571   if test -s conftest.err; then
2572     grep -v '^ *+' conftest.err >conftest.er1
2573     cat conftest.er1 >&5
2574     mv -f conftest.er1 conftest.err
2575   fi
2576   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2577   test $ac_status = 0; } && {
2578          test -z "$ac_c_werror_flag" ||
2579          test ! -s conftest.err
2580        } && test -s conftest$ac_exeext && {
2581          test "$cross_compiling" = yes ||
2582          test -x conftest$ac_exeext
2583        }; then :
2584   ac_retval=0
2585 else
2586   $as_echo "$as_me: failed program was:" >&5
2587 sed 's/^/| /' conftest.$ac_ext >&5
2588 
2589         ac_retval=1
2590 fi
2591   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2592   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2593   # interfere with the next link command; also delete a directory that is
2594   # left behind by Apple's compiler.  We do this before executing the actions.
2595   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2596   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2597   as_fn_set_status $ac_retval
2598 
2599 } # ac_fn_c_try_link
2600 
2601 # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2602 # ---------------------------------------------------------
2603 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2604 # the include files in INCLUDES and setting the cache variable VAR
2605 # accordingly.
2606 ac_fn_cxx_check_header_mongrel ()
2607 {
2608   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2609   if eval \${$3+:} false; then :
2610   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2611 $as_echo_n "checking for $2... " >&6; }
2612 if eval \${$3+:} false; then :
2613   $as_echo_n "(cached) " >&6
2614 fi
2615 eval ac_res=\$$3
2616                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2617 $as_echo "$ac_res" >&6; }
2618 else
2619   # Is the header compilable?
2620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2621 $as_echo_n "checking $2 usability... " >&6; }
2622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2623 /* end confdefs.h.  */
2624 $4
2625 #include <$2>
2626 _ACEOF
2627 if ac_fn_cxx_try_compile "$LINENO"; then :
2628   ac_header_compiler=yes
2629 else
2630   ac_header_compiler=no
2631 fi
2632 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2634 $as_echo "$ac_header_compiler" >&6; }
2635 
2636 # Is the header present?
2637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2638 $as_echo_n "checking $2 presence... " >&6; }
2639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2640 /* end confdefs.h.  */
2641 #include <$2>
2642 _ACEOF
2643 if ac_fn_cxx_try_cpp "$LINENO"; then :
2644   ac_header_preproc=yes
2645 else
2646   ac_header_preproc=no
2647 fi
2648 rm -f conftest.err conftest.i conftest.$ac_ext
2649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2650 $as_echo "$ac_header_preproc" >&6; }
2651 
2652 # So?  What about this header?
2653 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2654   yes:no: )
2655     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2656 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2657     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2658 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2659     ;;
2660   no:yes:* )
2661     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2662 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2663     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2664 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2665     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2666 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2667     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2668 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2669     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2670 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2671 ( $as_echo "## ----------------------------------------- ##
2672 ## Report this to build-dev@openjdk.java.net ##
2673 ## ----------------------------------------- ##"
2674      ) | sed "s/^/$as_me: WARNING:     /" >&2
2675     ;;
2676 esac
2677   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2678 $as_echo_n "checking for $2... " >&6; }
2679 if eval \${$3+:} false; then :
2680   $as_echo_n "(cached) " >&6
2681 else
2682   eval "$3=\$ac_header_compiler"
2683 fi
2684 eval ac_res=\$$3
2685                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2686 $as_echo "$ac_res" >&6; }
2687 fi
2688   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2689 
2690 } # ac_fn_cxx_check_header_mongrel
2691 
2692 # ac_fn_cxx_try_run LINENO
2693 # ------------------------
2694 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2695 # that executables *can* be run.
2696 ac_fn_cxx_try_run ()
2697 {
2698   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2699   if { { ac_try="$ac_link"
2700 case "(($ac_try" in
2701   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2702   *) ac_try_echo=$ac_try;;
2703 esac
2704 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2705 $as_echo "$ac_try_echo"; } >&5
2706   (eval "$ac_link") 2>&5
2707   ac_status=$?
2708   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2709   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2710   { { case "(($ac_try" in
2711   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2712   *) ac_try_echo=$ac_try;;
2713 esac
2714 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2715 $as_echo "$ac_try_echo"; } >&5
2716   (eval "$ac_try") 2>&5
2717   ac_status=$?
2718   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2719   test $ac_status = 0; }; }; then :
2720   ac_retval=0
2721 else
2722   $as_echo "$as_me: program exited with status $ac_status" >&5
2723        $as_echo "$as_me: failed program was:" >&5
2724 sed 's/^/| /' conftest.$ac_ext >&5
2725 
2726        ac_retval=$ac_status
2727 fi
2728   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2729   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2730   as_fn_set_status $ac_retval
2731 
2732 } # ac_fn_cxx_try_run
2733 
2734 # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2735 # ---------------------------------------------------------
2736 # Tests whether HEADER exists and can be compiled using the include files in
2737 # INCLUDES, setting the cache variable VAR accordingly.
2738 ac_fn_cxx_check_header_compile ()
2739 {
2740   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2741   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2742 $as_echo_n "checking for $2... " >&6; }
2743 if eval \${$3+:} false; then :
2744   $as_echo_n "(cached) " >&6
2745 else
2746   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2747 /* end confdefs.h.  */
2748 $4
2749 #include <$2>
2750 _ACEOF
2751 if ac_fn_cxx_try_compile "$LINENO"; then :
2752   eval "$3=yes"
2753 else
2754   eval "$3=no"
2755 fi
2756 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2757 fi
2758 eval ac_res=\$$3
2759                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2760 $as_echo "$ac_res" >&6; }
2761   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2762 
2763 } # ac_fn_cxx_check_header_compile
2764 
2765 # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2766 # ----------------------------------------------
2767 # Tries to find the compile-time value of EXPR in a program that includes
2768 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2769 # computed
2770 ac_fn_cxx_compute_int ()
2771 {
2772   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2773   if test "$cross_compiling" = yes; then
2774     # Depending upon the size, compute the lo and hi bounds.
2775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2776 /* end confdefs.h.  */
2777 $4
2778 int
2779 main ()
2780 {
2781 static int test_array [1 - 2 * !(($2) >= 0)];
2782 test_array [0] = 0;
2783 return test_array [0];
2784 
2785   ;
2786   return 0;
2787 }
2788 _ACEOF
2789 if ac_fn_cxx_try_compile "$LINENO"; then :
2790   ac_lo=0 ac_mid=0
2791   while :; do
2792     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2793 /* end confdefs.h.  */
2794 $4
2795 int
2796 main ()
2797 {
2798 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2799 test_array [0] = 0;
2800 return test_array [0];
2801 
2802   ;
2803   return 0;
2804 }
2805 _ACEOF
2806 if ac_fn_cxx_try_compile "$LINENO"; then :
2807   ac_hi=$ac_mid; break
2808 else
2809   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2810                         if test $ac_lo -le $ac_mid; then
2811                           ac_lo= ac_hi=
2812                           break
2813                         fi
2814                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2815 fi
2816 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2817   done
2818 else
2819   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2820 /* end confdefs.h.  */
2821 $4
2822 int
2823 main ()
2824 {
2825 static int test_array [1 - 2 * !(($2) < 0)];
2826 test_array [0] = 0;
2827 return test_array [0];
2828 
2829   ;
2830   return 0;
2831 }
2832 _ACEOF
2833 if ac_fn_cxx_try_compile "$LINENO"; then :
2834   ac_hi=-1 ac_mid=-1
2835   while :; do
2836     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2837 /* end confdefs.h.  */
2838 $4
2839 int
2840 main ()
2841 {
2842 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2843 test_array [0] = 0;
2844 return test_array [0];
2845 
2846   ;
2847   return 0;
2848 }
2849 _ACEOF
2850 if ac_fn_cxx_try_compile "$LINENO"; then :
2851   ac_lo=$ac_mid; break
2852 else
2853   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2854                         if test $ac_mid -le $ac_hi; then
2855                           ac_lo= ac_hi=
2856                           break
2857                         fi
2858                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2859 fi
2860 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2861   done
2862 else
2863   ac_lo= ac_hi=
2864 fi
2865 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2866 fi
2867 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2868 # Binary search between lo and hi bounds.
2869 while test "x$ac_lo" != "x$ac_hi"; do
2870   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2871   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2872 /* end confdefs.h.  */
2873 $4
2874 int
2875 main ()
2876 {
2877 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2878 test_array [0] = 0;
2879 return test_array [0];
2880 
2881   ;
2882   return 0;
2883 }
2884 _ACEOF
2885 if ac_fn_cxx_try_compile "$LINENO"; then :
2886   ac_hi=$ac_mid
2887 else
2888   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2889 fi
2890 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2891 done
2892 case $ac_lo in #((
2893 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2894 '') ac_retval=1 ;;
2895 esac
2896   else
2897     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2898 /* end confdefs.h.  */
2899 $4
2900 static long int longval () { return $2; }
2901 static unsigned long int ulongval () { return $2; }
2902 #include <stdio.h>
2903 #include <stdlib.h>
2904 int
2905 main ()
2906 {
2907 
2908   FILE *f = fopen ("conftest.val", "w");
2909   if (! f)
2910     return 1;
2911   if (($2) < 0)
2912     {
2913       long int i = longval ();
2914       if (i != ($2))
2915         return 1;
2916       fprintf (f, "%ld", i);
2917     }
2918   else
2919     {
2920       unsigned long int i = ulongval ();
2921       if (i != ($2))
2922         return 1;
2923       fprintf (f, "%lu", i);
2924     }
2925   /* Do not output a trailing newline, as this causes \r\n confusion
2926      on some platforms.  */
2927   return ferror (f) || fclose (f) != 0;
2928 
2929   ;
2930   return 0;
2931 }
2932 _ACEOF
2933 if ac_fn_cxx_try_run "$LINENO"; then :
2934   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2935 else
2936   ac_retval=1
2937 fi
2938 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2939   conftest.$ac_objext conftest.beam conftest.$ac_ext
2940 rm -f conftest.val
2941 
2942   fi
2943   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2944   as_fn_set_status $ac_retval
2945 
2946 } # ac_fn_cxx_compute_int
2947 
2948 # ac_fn_cxx_try_link LINENO
2949 # -------------------------
2950 # Try to link conftest.$ac_ext, and return whether this succeeded.
2951 ac_fn_cxx_try_link ()
2952 {
2953   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2954   rm -f conftest.$ac_objext conftest$ac_exeext
2955   if { { ac_try="$ac_link"
2956 case "(($ac_try" in
2957   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2958   *) ac_try_echo=$ac_try;;
2959 esac
2960 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2961 $as_echo "$ac_try_echo"; } >&5
2962   (eval "$ac_link") 2>conftest.err
2963   ac_status=$?
2964   if test -s conftest.err; then
2965     grep -v '^ *+' conftest.err >conftest.er1
2966     cat conftest.er1 >&5
2967     mv -f conftest.er1 conftest.err
2968   fi
2969   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2970   test $ac_status = 0; } && {
2971          test -z "$ac_cxx_werror_flag" ||
2972          test ! -s conftest.err
2973        } && test -s conftest$ac_exeext && {
2974          test "$cross_compiling" = yes ||
2975          test -x conftest$ac_exeext
2976        }; then :
2977   ac_retval=0
2978 else
2979   $as_echo "$as_me: failed program was:" >&5
2980 sed 's/^/| /' conftest.$ac_ext >&5
2981 
2982         ac_retval=1
2983 fi
2984   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2985   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2986   # interfere with the next link command; also delete a directory that is
2987   # left behind by Apple's compiler.  We do this before executing the actions.
2988   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2989   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2990   as_fn_set_status $ac_retval
2991 
2992 } # ac_fn_cxx_try_link
2993 
2994 # ac_fn_cxx_check_func LINENO FUNC VAR
2995 # ------------------------------------
2996 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2997 ac_fn_cxx_check_func ()
2998 {
2999   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3000   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3001 $as_echo_n "checking for $2... " >&6; }
3002 if eval \${$3+:} false; then :
3003   $as_echo_n "(cached) " >&6
3004 else
3005   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3006 /* end confdefs.h.  */
3007 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
3008    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
3009 #define $2 innocuous_$2
3010 
3011 /* System header to define __stub macros and hopefully few prototypes,
3012     which can conflict with char $2 (); below.
3013     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3014     <limits.h> exists even on freestanding compilers.  */
3015 
3016 #ifdef __STDC__
3017 # include <limits.h>
3018 #else
3019 # include <assert.h>
3020 #endif
3021 
3022 #undef $2
3023 
3024 /* Override any GCC internal prototype to avoid an error.
3025    Use char because int might match the return type of a GCC
3026    builtin and then its argument prototype would still apply.  */
3027 #ifdef __cplusplus
3028 extern "C"
3029 #endif
3030 char $2 ();
3031 /* The GNU C library defines this for functions which it implements
3032     to always fail with ENOSYS.  Some functions are actually named
3033     something starting with __ and the normal name is an alias.  */
3034 #if defined __stub_$2 || defined __stub___$2
3035 choke me
3036 #endif
3037 
3038 int
3039 main ()
3040 {
3041 return $2 ();
3042   ;
3043   return 0;
3044 }
3045 _ACEOF
3046 if ac_fn_cxx_try_link "$LINENO"; then :
3047   eval "$3=yes"
3048 else
3049   eval "$3=no"
3050 fi
3051 rm -f core conftest.err conftest.$ac_objext \
3052     conftest$ac_exeext conftest.$ac_ext
3053 fi
3054 eval ac_res=\$$3
3055                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3056 $as_echo "$ac_res" >&6; }
3057   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3058 
3059 } # ac_fn_cxx_check_func
3060 
3061 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3062 # -------------------------------------------------------
3063 # Tests whether HEADER exists and can be compiled using the include files in
3064 # INCLUDES, setting the cache variable VAR accordingly.
3065 ac_fn_c_check_header_compile ()
3066 {
3067   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3068   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3069 $as_echo_n "checking for $2... " >&6; }
3070 if eval \${$3+:} false; then :
3071   $as_echo_n "(cached) " >&6
3072 else
3073   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3074 /* end confdefs.h.  */
3075 $4
3076 #include <$2>
3077 _ACEOF
3078 if ac_fn_c_try_compile "$LINENO"; then :
3079   eval "$3=yes"
3080 else
3081   eval "$3=no"
3082 fi
3083 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3084 fi
3085 eval ac_res=\$$3
3086                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3087 $as_echo "$ac_res" >&6; }
3088   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3089 
3090 } # ac_fn_c_check_header_compile
3091 cat >config.log <<_ACEOF
3092 This file contains any messages produced by compilers while
3093 running configure, to aid debugging if configure makes a mistake.
3094 
3095 It was created by OpenJDK $as_me jdk9, which was
3096 generated by GNU Autoconf 2.69.  Invocation command line was
3097 
3098   $ $0 $@
3099 
3100 _ACEOF
3101 exec 5>>config.log
3102 {
3103 cat <<_ASUNAME
3104 ## --------- ##
3105 ## Platform. ##
3106 ## --------- ##
3107 
3108 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3109 uname -m = `(uname -m) 2>/dev/null || echo unknown`
3110 uname -r = `(uname -r) 2>/dev/null || echo unknown`
3111 uname -s = `(uname -s) 2>/dev/null || echo unknown`
3112 uname -v = `(uname -v) 2>/dev/null || echo unknown`
3113 
3114 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3115 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3116 
3117 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3118 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3119 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3120 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3121 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3122 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3123 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3124 
3125 _ASUNAME
3126 
3127 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3128 for as_dir in $PATH
3129 do
3130   IFS=$as_save_IFS
3131   test -z "$as_dir" && as_dir=.
3132     $as_echo "PATH: $as_dir"
3133   done
3134 IFS=$as_save_IFS
3135 
3136 } >&5
3137 
3138 cat >&5 <<_ACEOF
3139 
3140 
3141 ## ----------- ##
3142 ## Core tests. ##
3143 ## ----------- ##
3144 
3145 _ACEOF
3146 
3147 
3148 # Keep a trace of the command line.
3149 # Strip out --no-create and --no-recursion so they do not pile up.
3150 # Strip out --silent because we don't want to record it for future runs.
3151 # Also quote any args containing shell meta-characters.
3152 # Make two passes to allow for proper duplicate-argument suppression.
3153 ac_configure_args=
3154 ac_configure_args0=
3155 ac_configure_args1=
3156 ac_must_keep_next=false
3157 for ac_pass in 1 2
3158 do
3159   for ac_arg
3160   do
3161     case $ac_arg in
3162     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3163     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3164     | -silent | --silent | --silen | --sile | --sil)
3165       continue ;;
3166     *\'*)
3167       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3168     esac
3169     case $ac_pass in
3170     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3171     2)
3172       as_fn_append ac_configure_args1 " '$ac_arg'"
3173       if test $ac_must_keep_next = true; then
3174         ac_must_keep_next=false # Got value, back to normal.
3175       else
3176         case $ac_arg in
3177           *=* | --config-cache | -C | -disable-* | --disable-* \
3178           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3179           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3180           | -with-* | --with-* | -without-* | --without-* | --x)
3181             case "$ac_configure_args0 " in
3182               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3183             esac
3184             ;;
3185           -* ) ac_must_keep_next=true ;;
3186         esac
3187       fi
3188       as_fn_append ac_configure_args " '$ac_arg'"
3189       ;;
3190     esac
3191   done
3192 done
3193 { ac_configure_args0=; unset ac_configure_args0;}
3194 { ac_configure_args1=; unset ac_configure_args1;}
3195 
3196 # When interrupted or exit'd, cleanup temporary files, and complete
3197 # config.log.  We remove comments because anyway the quotes in there
3198 # would cause problems or look ugly.
3199 # WARNING: Use '\'' to represent an apostrophe within the trap.
3200 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3201 trap 'exit_status=$?
3202   # Save into config.log some information that might help in debugging.
3203   {
3204     echo
3205 
3206     $as_echo "## ---------------- ##
3207 ## Cache variables. ##
3208 ## ---------------- ##"
3209     echo
3210     # The following way of writing the cache mishandles newlines in values,
3211 (
3212   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3213     eval ac_val=\$$ac_var
3214     case $ac_val in #(
3215     *${as_nl}*)
3216       case $ac_var in #(
3217       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3218 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3219       esac
3220       case $ac_var in #(
3221       _ | IFS | as_nl) ;; #(
3222       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3223       *) { eval $ac_var=; unset $ac_var;} ;;
3224       esac ;;
3225     esac
3226   done
3227   (set) 2>&1 |
3228     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3229     *${as_nl}ac_space=\ *)
3230       sed -n \
3231         "s/'\''/'\''\\\\'\'''\''/g;
3232           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3233       ;; #(
3234     *)
3235       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3236       ;;
3237     esac |
3238     sort
3239 )
3240     echo
3241 
3242     $as_echo "## ----------------- ##
3243 ## Output variables. ##
3244 ## ----------------- ##"
3245     echo
3246     for ac_var in $ac_subst_vars
3247     do
3248       eval ac_val=\$$ac_var
3249       case $ac_val in
3250       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3251       esac
3252       $as_echo "$ac_var='\''$ac_val'\''"
3253     done | sort
3254     echo
3255 
3256     if test -n "$ac_subst_files"; then
3257       $as_echo "## ------------------- ##
3258 ## File substitutions. ##
3259 ## ------------------- ##"
3260       echo
3261       for ac_var in $ac_subst_files
3262       do
3263         eval ac_val=\$$ac_var
3264         case $ac_val in
3265         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3266         esac
3267         $as_echo "$ac_var='\''$ac_val'\''"
3268       done | sort
3269       echo
3270     fi
3271 
3272     if test -s confdefs.h; then
3273       $as_echo "## ----------- ##
3274 ## confdefs.h. ##
3275 ## ----------- ##"
3276       echo
3277       cat confdefs.h
3278       echo
3279     fi
3280     test "$ac_signal" != 0 &&
3281       $as_echo "$as_me: caught signal $ac_signal"
3282     $as_echo "$as_me: exit $exit_status"
3283   } >&5
3284   rm -f core *.core core.conftest.* &&
3285     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3286     exit $exit_status
3287 ' 0
3288 for ac_signal in 1 2 13 15; do
3289   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3290 done
3291 ac_signal=0
3292 
3293 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3294 rm -f -r conftest* confdefs.h
3295 
3296 $as_echo "/* confdefs.h */" > confdefs.h
3297 
3298 # Predefined preprocessor variables.
3299 
3300 cat >>confdefs.h <<_ACEOF
3301 #define PACKAGE_NAME "$PACKAGE_NAME"
3302 _ACEOF
3303 
3304 cat >>confdefs.h <<_ACEOF
3305 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3306 _ACEOF
3307 
3308 cat >>confdefs.h <<_ACEOF
3309 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3310 _ACEOF
3311 
3312 cat >>confdefs.h <<_ACEOF
3313 #define PACKAGE_STRING "$PACKAGE_STRING"
3314 _ACEOF
3315 
3316 cat >>confdefs.h <<_ACEOF
3317 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3318 _ACEOF
3319 
3320 cat >>confdefs.h <<_ACEOF
3321 #define PACKAGE_URL "$PACKAGE_URL"
3322 _ACEOF
3323 
3324 
3325 # Let the site file select an alternate cache file if it wants to.
3326 # Prefer an explicitly selected file to automatically selected ones.
3327 ac_site_file1=NONE
3328 ac_site_file2=NONE
3329 if test -n "$CONFIG_SITE"; then
3330   # We do not want a PATH search for config.site.
3331   case $CONFIG_SITE in #((
3332     -*)  ac_site_file1=./$CONFIG_SITE;;
3333     */*) ac_site_file1=$CONFIG_SITE;;
3334     *)   ac_site_file1=./$CONFIG_SITE;;
3335   esac
3336 elif test "x$prefix" != xNONE; then
3337   ac_site_file1=$prefix/share/config.site
3338   ac_site_file2=$prefix/etc/config.site
3339 else
3340   ac_site_file1=$ac_default_prefix/share/config.site
3341   ac_site_file2=$ac_default_prefix/etc/config.site
3342 fi
3343 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3344 do
3345   test "x$ac_site_file" = xNONE && continue
3346   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3347     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3348 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3349     sed 's/^/| /' "$ac_site_file" >&5
3350     . "$ac_site_file" \
3351       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3352 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3353 as_fn_error $? "failed to load site script $ac_site_file
3354 See \`config.log' for more details" "$LINENO" 5; }
3355   fi
3356 done
3357 
3358 if test -r "$cache_file"; then
3359   # Some versions of bash will fail to source /dev/null (special files
3360   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3361   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3362     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3363 $as_echo "$as_me: loading cache $cache_file" >&6;}
3364     case $cache_file in
3365       [\\/]* | ?:[\\/]* ) . "$cache_file";;
3366       *)                      . "./$cache_file";;
3367     esac
3368   fi
3369 else
3370   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3371 $as_echo "$as_me: creating cache $cache_file" >&6;}
3372   >$cache_file
3373 fi
3374 
3375 # Check that the precious variables saved in the cache have kept the same
3376 # value.
3377 ac_cache_corrupted=false
3378 for ac_var in $ac_precious_vars; do
3379   eval ac_old_set=\$ac_cv_env_${ac_var}_set
3380   eval ac_new_set=\$ac_env_${ac_var}_set
3381   eval ac_old_val=\$ac_cv_env_${ac_var}_value
3382   eval ac_new_val=\$ac_env_${ac_var}_value
3383   case $ac_old_set,$ac_new_set in
3384     set,)
3385       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3386 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3387       ac_cache_corrupted=: ;;
3388     ,set)
3389       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3390 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3391       ac_cache_corrupted=: ;;
3392     ,);;
3393     *)
3394       if test "x$ac_old_val" != "x$ac_new_val"; then
3395         # differences in whitespace do not lead to failure.
3396         ac_old_val_w=`echo x $ac_old_val`
3397         ac_new_val_w=`echo x $ac_new_val`
3398         if test "$ac_old_val_w" != "$ac_new_val_w"; then
3399           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3400 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3401           ac_cache_corrupted=:
3402         else
3403           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3404 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3405           eval $ac_var=\$ac_old_val
3406         fi
3407         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3408 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3409         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3410 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3411       fi;;
3412   esac
3413   # Pass precious variables to config.status.
3414   if test "$ac_new_set" = set; then
3415     case $ac_new_val in
3416     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3417     *) ac_arg=$ac_var=$ac_new_val ;;
3418     esac
3419     case " $ac_configure_args " in
3420       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3421       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3422     esac
3423   fi
3424 done
3425 if $ac_cache_corrupted; then
3426   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3427 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3428   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3429 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3430   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3431 fi
3432 ## -------------------- ##
3433 ## Main body of script. ##
3434 ## -------------------- ##
3435 
3436 ac_ext=c
3437 ac_cpp='$CPP $CPPFLAGS'
3438 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3439 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3440 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3441 
3442 
3443 
3444 ac_aux_dir=
3445 for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3446   if test -f "$ac_dir/install-sh"; then
3447     ac_aux_dir=$ac_dir
3448     ac_install_sh="$ac_aux_dir/install-sh -c"
3449     break
3450   elif test -f "$ac_dir/install.sh"; then
3451     ac_aux_dir=$ac_dir
3452     ac_install_sh="$ac_aux_dir/install.sh -c"
3453     break
3454   elif test -f "$ac_dir/shtool"; then
3455     ac_aux_dir=$ac_dir
3456     ac_install_sh="$ac_aux_dir/shtool install -c"
3457     break
3458   fi
3459 done
3460 if test -z "$ac_aux_dir"; then
3461   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
3462 fi
3463 
3464 # These three variables are undocumented and unsupported,
3465 # and are intended to be withdrawn in a future Autoconf release.
3466 # They can cause serious problems if a builder's source tree is in a directory
3467 # whose full name contains unusual characters.
3468 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3469 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3470 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3471 
3472 
3473 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3474 
3475 #
3476 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3477 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3478 #
3479 # This code is free software; you can redistribute it and/or modify it
3480 # under the terms of the GNU General Public License version 2 only, as
3481 # published by the Free Software Foundation.  Oracle designates this
3482 # particular file as subject to the "Classpath" exception as provided
3483 # by Oracle in the LICENSE file that accompanied this code.
3484 #
3485 # This code is distributed in the hope that it will be useful, but WITHOUT
3486 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3487 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3488 # version 2 for more details (a copy is included in the LICENSE file that
3489 # accompanied this code).
3490 #
3491 # You should have received a copy of the GNU General Public License version
3492 # 2 along with this work; if not, write to the Free Software Foundation,
3493 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3494 #
3495 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3496 # or visit www.oracle.com if you need additional information or have any
3497 # questions.
3498 #
3499 
3500 #
3501 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
3502 #
3503 # This program is free software; you can redistribute it and/or modify
3504 # it under the terms of the GNU General Public License as published by
3505 # the Free Software Foundation; either version 2 of the License, or
3506 # (at your option) any later version.
3507 #
3508 # This program is distributed in the hope that it will be useful, but
3509 # WITHOUT ANY WARRANTY; without even the implied warranty of
3510 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3511 # General Public License for more details.
3512 #
3513 # You should have received a copy of the GNU General Public License
3514 # along with this program; if not, write to the Free Software
3515 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3516 #
3517 # As a special exception to the GNU General Public License, if you
3518 # distribute this file as part of a program that contains a
3519 # configuration script generated by Autoconf, you may include it under
3520 # the same distribution terms that you use for the rest of that program.
3521 
3522 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
3523 # ----------------------------------
3524 # PKG_PROG_PKG_CONFIG
3525 
3526 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3527 #
3528 # Check to see whether a particular set of modules exists.  Similar
3529 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
3530 #
3531 #
3532 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
3533 # this or PKG_CHECK_MODULES is called, or make sure to call
3534 # PKG_CHECK_EXISTS manually
3535 # --------------------------------------------------------------
3536 
3537 
3538 
3539 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3540 # ---------------------------------------------
3541 # _PKG_CONFIG
3542 
3543 # _PKG_SHORT_ERRORS_SUPPORTED
3544 # -----------------------------
3545 # _PKG_SHORT_ERRORS_SUPPORTED
3546 
3547 
3548 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3549 # [ACTION-IF-NOT-FOUND])
3550 #
3551 #
3552 # Note that if there is a possibility the first call to
3553 # PKG_CHECK_MODULES might not happen, you should be sure to include an
3554 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3555 #
3556 #
3557 # --------------------------------------------------------------
3558 # PKG_CHECK_MODULES
3559 
3560 
3561 # Include these first...
3562 #
3563 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3564 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3565 #
3566 # This code is free software; you can redistribute it and/or modify it
3567 # under the terms of the GNU General Public License version 2 only, as
3568 # published by the Free Software Foundation.  Oracle designates this
3569 # particular file as subject to the "Classpath" exception as provided
3570 # by Oracle in the LICENSE file that accompanied this code.
3571 #
3572 # This code is distributed in the hope that it will be useful, but WITHOUT
3573 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3574 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3575 # version 2 for more details (a copy is included in the LICENSE file that
3576 # accompanied this code).
3577 #
3578 # You should have received a copy of the GNU General Public License version
3579 # 2 along with this work; if not, write to the Free Software Foundation,
3580 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3581 #
3582 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3583 # or visit www.oracle.com if you need additional information or have any
3584 # questions.
3585 #
3586 
3587 # Create a function/macro that takes a series of named arguments. The call is
3588 # similar to AC_DEFUN, but the setup of the function looks like this:
3589 # BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3590 # ... do something
3591 #   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3592 # ])
3593 # A star (*) in front of a named argument means that it is required and it's
3594 # presence will be verified. To pass e.g. the first value as a normal indexed
3595 # argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3596 # arguments are referenced in the function by their name prefixed by ARG_, e.g.
3597 # "ARG_FOO".
3598 #
3599 # The generated function can be called like this:
3600 # MYFUNC(FOO: [foo-val],
3601 #     BAR: [
3602 #         $ECHO hello world
3603 #     ])
3604 # Note that the argument value must start on the same line as the argument name.
3605 #
3606 # Argument 1: Name of the function to define
3607 # Argument 2: List of legal named arguments, with a * prefix for required arguments
3608 # Argument 3: Argument array to treat as named, typically $@
3609 # Argument 4: The main function body
3610 
3611 
3612 # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3613 # If so, then append $1 to $2 \
3614 # Also set JVM_ARG_OK to true/false depending on outcome.
3615 
3616 
3617 # Appends a string to a path variable, only adding the : when needed.
3618 
3619 
3620 # Prepends a string to a path variable, only adding the : when needed.
3621 
3622 
3623 # This will make sure the given variable points to a full and proper
3624 # path. This means:
3625 # 1) There will be no spaces in the path. On unix platforms,
3626 #    spaces in the path will result in an error. On Windows,
3627 #    the path will be rewritten using short-style to be space-free.
3628 # 2) The path will be absolute, and it will be in unix-style (on
3629 #     cygwin).
3630 # $1: The name of the variable to fix
3631 
3632 
3633 # This will make sure the given variable points to a executable
3634 # with a full and proper path. This means:
3635 # 1) There will be no spaces in the path. On unix platforms,
3636 #    spaces in the path will result in an error. On Windows,
3637 #    the path will be rewritten using short-style to be space-free.
3638 # 2) The path will be absolute, and it will be in unix-style (on
3639 #     cygwin).
3640 # Any arguments given to the executable is preserved.
3641 # If the input variable does not have a directory specification, then
3642 # it need to be in the PATH.
3643 # $1: The name of the variable to fix
3644 
3645 
3646 
3647 
3648 # Register a --with argument but mark it as deprecated
3649 # $1: The name of the with argument to deprecate, not including --with-
3650 
3651 
3652 # Register a --enable argument but mark it as deprecated
3653 # $1: The name of the with argument to deprecate, not including --enable-
3654 # $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3655 # $3: Messages to user.
3656 
3657 
3658 
3659 
3660 # Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3661 # $1: variable to check
3662 
3663 
3664 # Check that there are no unprocessed overridden variables left.
3665 # If so, they are an incorrect argument and we will exit with an error.
3666 
3667 
3668 # Setup a tool for the given variable. If correctly specified by the user,
3669 # use that value, otherwise search for the tool using the supplied code snippet.
3670 # $1: variable to set
3671 # $2: code snippet to call to look for the tool
3672 # $3: code snippet to call if variable was used to find tool
3673 
3674 
3675 # Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3676 # $1: variable to set
3677 # $2: executable name (or list of names) to look for
3678 # $3: [path]
3679 
3680 
3681 # Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3682 # $1: variable to set
3683 # $2: executable name (or list of names) to look for
3684 
3685 
3686 # Like BASIC_PATH_PROGS but fails if no tool was found.
3687 # $1: variable to set
3688 # $2: executable name (or list of names) to look for
3689 # $3: [path]
3690 
3691 
3692 # Like BASIC_SETUP_TOOL but fails if no tool was found.
3693 # $1: variable to set
3694 # $2: autoconf macro to call to look for the special tool
3695 
3696 
3697 # Setup the most fundamental tools that relies on not much else to set up,
3698 # but is used by much of the early bootstrap code.
3699 
3700 
3701 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3702 
3703 
3704 # Evaluates platform specific overrides for devkit variables.
3705 # $1: Name of variable
3706 
3707 
3708 
3709 
3710 
3711 
3712 #%%% Simple tools %%%
3713 
3714 # Check if we have found a usable version of make
3715 # $1: the path to a potential make binary (or empty)
3716 # $2: the description on how we found this
3717 
3718 
3719 
3720 
3721 # Goes looking for a usable version of GNU make.
3722 
3723 
3724 
3725 
3726 
3727 
3728 
3729 
3730 
3731 
3732 # Check if build directory is on local disk. If not possible to determine,
3733 # we prefer to claim it's local.
3734 # Argument 1: directory to test
3735 # Argument 2: what to do if it is on local disk
3736 # Argument 3: what to do otherwise (remote disk or failure)
3737 
3738 
3739 # Check that source files have basic read permissions set. This might
3740 # not be the case in cygwin in certain conditions.
3741 
3742 
3743 
3744 
3745 # Check for support for specific options in bash
3746 
3747 
3748 ################################################################################
3749 #
3750 # Default make target
3751 #
3752 
3753 
3754 # Code to run after AC_OUTPUT
3755 
3756 
3757 #
3758 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3759 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3760 #
3761 # This code is free software; you can redistribute it and/or modify it
3762 # under the terms of the GNU General Public License version 2 only, as
3763 # published by the Free Software Foundation.  Oracle designates this
3764 # particular file as subject to the "Classpath" exception as provided
3765 # by Oracle in the LICENSE file that accompanied this code.
3766 #
3767 # This code is distributed in the hope that it will be useful, but WITHOUT
3768 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3769 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3770 # version 2 for more details (a copy is included in the LICENSE file that
3771 # accompanied this code).
3772 #
3773 # You should have received a copy of the GNU General Public License version
3774 # 2 along with this work; if not, write to the Free Software Foundation,
3775 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3776 #
3777 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3778 # or visit www.oracle.com if you need additional information or have any
3779 # questions.
3780 #
3781 
3782 
3783 
3784 
3785 
3786 # Helper function which possibly converts a path using DOS-style short mode.
3787 # If so, the updated path is stored in $new_path.
3788 # $1: The path to check
3789 
3790 
3791 # Helper function which possibly converts a path using DOS-style short mode.
3792 # If so, the updated path is stored in $new_path.
3793 # $1: The path to check
3794 
3795 
3796 # FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3797 # and could probably be heavily simplified. However, all changes in this
3798 # area tend to need lot of testing in different scenarios, and in lack of
3799 # proper unit testing, cleaning this up has not been deemed worth the effort
3800 # at the moment.
3801 
3802 
3803 
3804 
3805 
3806 
3807 
3808 
3809 
3810 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3811 
3812 
3813 
3814 
3815 # ... then the rest
3816 #
3817 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3818 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3819 #
3820 # This code is free software; you can redistribute it and/or modify it
3821 # under the terms of the GNU General Public License version 2 only, as
3822 # published by the Free Software Foundation.  Oracle designates this
3823 # particular file as subject to the "Classpath" exception as provided
3824 # by Oracle in the LICENSE file that accompanied this code.
3825 #
3826 # This code is distributed in the hope that it will be useful, but WITHOUT
3827 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3828 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3829 # version 2 for more details (a copy is included in the LICENSE file that
3830 # accompanied this code).
3831 #
3832 # You should have received a copy of the GNU General Public License version
3833 # 2 along with this work; if not, write to the Free Software Foundation,
3834 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3835 #
3836 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3837 # or visit www.oracle.com if you need additional information or have any
3838 # questions.
3839 #
3840 
3841 ########################################################################
3842 # This file handles detection of the Boot JDK. The Boot JDK detection
3843 # process has been developed as a response to solve a complex real-world
3844 # problem. Initially, it was simple, but it has grown as platform after
3845 # platform, idiosyncracy after idiosyncracy has been supported.
3846 #
3847 # The basic idea is this:
3848 # 1) You need an acceptable *) JDK to use as a Boot JDK
3849 # 2) There are several ways to locate a JDK, that are mostly platform
3850 #    dependent **)
3851 # 3) You can have multiple JDKs installed
3852 # 4) If possible, configure should try to dig out an acceptable JDK
3853 #    automatically, without having to resort to command-line options
3854 #
3855 # *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3856 #     javac) and not a JRE, etc.
3857 #
3858 # **) On Windows we typically use a well-known path.
3859 #     On MacOSX we typically use the tool java_home.
3860 #     On Linux we typically find javac in the $PATH, and then follow a
3861 #     chain of symlinks that often ends up in a real JDK.
3862 #
3863 # This leads to the code where we check in different ways to locate a
3864 # JDK, and if one is found, check if it is acceptable. If not, we print
3865 # our reasons for rejecting it (useful when debugging non-working
3866 # configure situations) and continue checking the next one.
3867 ########################################################################
3868 
3869 # Execute the check given as argument, and verify the result
3870 # If the Boot JDK was previously found, do nothing
3871 # $1 A command line (typically autoconf macro) to execute
3872 
3873 
3874 # Test: Is bootjdk explicitly set by command line arguments?
3875 
3876 
3877 # Test: Is $JAVA_HOME set?
3878 
3879 
3880 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3881 
3882 
3883 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3884 # $1: Argument to the java_home binary (optional)
3885 
3886 
3887 # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3888 
3889 
3890 # Look for a jdk in the given path. If there are multiple, try to select the newest.
3891 # If found, set BOOT_JDK and BOOT_JDK_FOUND.
3892 # $1 = Path to directory containing jdk installations.
3893 # $2 = String to append to the found JDK directory to get the proper JDK home
3894 
3895 
3896 # Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3897 # environmental variable as base for where to look.
3898 # $1 Name of an environmal variable, assumed to point to the Program Files directory.
3899 
3900 
3901 # Test: Is there a JDK installed in default, well-known locations?
3902 
3903 
3904 # Check that a command-line tool in the Boot JDK is correct
3905 # $1 = name of variable to assign
3906 # $2 = name of binary
3907 
3908 
3909 ###############################################################################
3910 #
3911 # We need a Boot JDK to bootstrap the build.
3912 #
3913 
3914 
3915 
3916 
3917 
3918 # BUILD_JDK: the location of the latest JDK that can run
3919 #   on the host system and supports the target class file version
3920 #   generated in this JDK build.  This variable should only be
3921 #   used after the launchers are built.
3922 #
3923 
3924 # Execute the check given as argument, and verify the result.
3925 # If the JDK was previously found, do nothing.
3926 # $1 A command line (typically autoconf macro) to execute
3927 
3928 
3929 # By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3930 # is different than the host system doing the build (e.g. cross-compilation),
3931 # a special BUILD_JDK is built as part of the build process.  An external
3932 # prebuilt BUILD_JDK can also be supplied.
3933 
3934 
3935 #
3936 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3937 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3938 #
3939 # This code is free software; you can redistribute it and/or modify it
3940 # under the terms of the GNU General Public License version 2 only, as
3941 # published by the Free Software Foundation.  Oracle designates this
3942 # particular file as subject to the "Classpath" exception as provided
3943 # by Oracle in the LICENSE file that accompanied this code.
3944 #
3945 # This code is distributed in the hope that it will be useful, but WITHOUT
3946 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3947 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3948 # version 2 for more details (a copy is included in the LICENSE file that
3949 # accompanied this code).
3950 #
3951 # You should have received a copy of the GNU General Public License version
3952 # 2 along with this work; if not, write to the Free Software Foundation,
3953 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3954 #
3955 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3956 # or visit www.oracle.com if you need additional information or have any
3957 # questions.
3958 #
3959 
3960 
3961 
3962 
3963 
3964 
3965 
3966 
3967 
3968 
3969 
3970 
3971 
3972 
3973 
3974 
3975 
3976 ################################################################################
3977 #
3978 # Runs icecc-create-env once and prints the error if it fails
3979 #
3980 # $1: arguments to icecc-create-env
3981 # $2: log file
3982 #
3983 
3984 
3985 ################################################################################
3986 #
3987 # Optionally enable distributed compilation of native code using icecc/icecream
3988 #
3989 
3990 
3991 
3992 
3993 
3994 
3995 
3996 #
3997 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3998 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3999 #
4000 # This code is free software; you can redistribute it and/or modify it
4001 # under the terms of the GNU General Public License version 2 only, as
4002 # published by the Free Software Foundation.  Oracle designates this
4003 # particular file as subject to the "Classpath" exception as provided
4004 # by Oracle in the LICENSE file that accompanied this code.
4005 #
4006 # This code is distributed in the hope that it will be useful, but WITHOUT
4007 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4008 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4009 # version 2 for more details (a copy is included in the LICENSE file that
4010 # accompanied this code).
4011 #
4012 # You should have received a copy of the GNU General Public License version
4013 # 2 along with this work; if not, write to the Free Software Foundation,
4014 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4015 #
4016 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4017 # or visit www.oracle.com if you need additional information or have any
4018 # questions.
4019 #
4020 
4021 ################################################################################
4022 #
4023 # Setup ABI profile (for arm)
4024 #
4025 
4026 
4027 # Reset the global CFLAGS/LDFLAGS variables and initialize them with the
4028 # corresponding configure arguments instead
4029 
4030 
4031 # Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4032 # that configure can use them while detecting compilers.
4033 # TOOLCHAIN_TYPE is available here.
4034 # Param 1 - Optional prefix to all variables. (e.g BUILD_)
4035 
4036 
4037 
4038 
4039 
4040 
4041 # Documentation on common flags used for solstudio in HIGHEST.
4042 #
4043 # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4044 #          done with care, there are some assumptions below that need to
4045 #          be understood about the use of pointers, and IEEE behavior.
4046 #
4047 # -fns: Use non-standard floating point mode (not IEEE 754)
4048 # -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4049 # -fsingle: Use single precision floating point with 'float'
4050 # -xalias_level=basic: Assume memory references via basic pointer types do not alias
4051 #   (Source with excessing pointer casting and data access with mixed
4052 #    pointer types are not recommended)
4053 # -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4054 #   (If you expect perfect errno behavior, do not use this)
4055 # -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4056 # -xrestrict: Pointer parameters to functions do not overlap
4057 #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4058 #    If you pass in multiple pointers to the same data, do not use this)
4059 # -xlibmil: Inline some library routines
4060 #   (If you expect perfect errno behavior, do not use this)
4061 # -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4062 #   (If you expect perfect errno behavior, do not use this)
4063 #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4064 
4065     # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4066     # Bug?
4067     #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4068     #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4069     #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4070     #fi
4071 
4072 
4073 
4074 
4075 
4076 
4077 ################################################################################
4078 # $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4079 #      conditionals against.
4080 # $2 - Optional prefix for each variable defined.
4081 
4082 
4083 # FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4084 #                                  IF_FALSE: [RUN-IF-FALSE])
4085 # ------------------------------------------------------------
4086 # Check that the C compiler supports an argument
4087 
4088 
4089 
4090 
4091 # FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4092 #                                    IF_FALSE: [RUN-IF-FALSE])
4093 # ------------------------------------------------------------
4094 # Check that the C++ compiler supports an argument
4095 
4096 
4097 
4098 
4099 # FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4100 #                                IF_FALSE: [RUN-IF-FALSE])
4101 # ------------------------------------------------------------
4102 # Check that the C and C++ compilers support an argument
4103 
4104 
4105 
4106 
4107 # FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4108 #                                   IF_FALSE: [RUN-IF-FALSE])
4109 # ------------------------------------------------------------
4110 # Check that the linker support an argument
4111 
4112 
4113 
4114 
4115 
4116 
4117 # FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
4118 # Arguments:
4119 # $1 - Optional prefix for each variable defined.
4120 
4121 
4122 #
4123 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4124 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4125 #
4126 # This code is free software; you can redistribute it and/or modify it
4127 # under the terms of the GNU General Public License version 2 only, as
4128 # published by the Free Software Foundation.  Oracle designates this
4129 # particular file as subject to the "Classpath" exception as provided
4130 # by Oracle in the LICENSE file that accompanied this code.
4131 #
4132 # This code is distributed in the hope that it will be useful, but WITHOUT
4133 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4134 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4135 # version 2 for more details (a copy is included in the LICENSE file that
4136 # accompanied this code).
4137 #
4138 # You should have received a copy of the GNU General Public License version
4139 # 2 along with this work; if not, write to the Free Software Foundation,
4140 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4141 #
4142 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4143 # or visit www.oracle.com if you need additional information or have any
4144 # questions.
4145 #
4146 
4147 
4148 
4149 
4150 
4151 cygwin_help() {
4152   case $1 in
4153     unzip)
4154       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4155       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4156       ;;
4157     zip)
4158       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4159       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4160       ;;
4161     make)
4162       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4163       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4164       ;;
4165     freetype)
4166       HELP_MSG="
4167 The freetype library can now be build during the configure process.
4168 Download the freetype sources and unpack them into an arbitrary directory:
4169 
4170 wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4171 tar -xzf freetype-2.5.3.tar.gz
4172 
4173 Then run configure with '--with-freetype-src=<freetype_src>'. This will
4174 automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4175 builds or into '<freetype_src>/lib32' for 32-bit builds.
4176 Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4177 and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4178 
4179 Alternatively you can unpack the sources like this to use the default directory:
4180 
4181 tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4182       ;;
4183   esac
4184 }
4185 
4186 msys_help() {
4187   PKGHANDLER_COMMAND=""
4188 }
4189 
4190 apt_help() {
4191   case $1 in
4192     reduced)
4193       PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4194     devkit)
4195       PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4196     openjdk)
4197       PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4198     alsa)
4199       PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4200     cups)
4201       PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4202     freetype)
4203       PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4204     ffi)
4205       PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4206     x11)
4207       PKGHANDLER_COMMAND="sudo apt-get install libx11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4208     ccache)
4209       PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4210     dtrace)
4211       PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4212     elf)
4213       PKGHANDLER_COMMAND="sudo apt-get install libelf-dev" ;;
4214   esac
4215 }
4216 
4217 yum_help() {
4218   case $1 in
4219     devkit)
4220       PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4221     openjdk)
4222       PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4223     alsa)
4224       PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4225     cups)
4226       PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4227     freetype)
4228       PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4229     x11)
4230       PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4231     ccache)
4232       PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4233     elf)
4234       PKGHANDLER_COMMAND="sudo yum install elfutils-libelf-devel" ;;
4235   esac
4236 }
4237 
4238 brew_help() {
4239   case $1 in
4240     openjdk)
4241       PKGHANDLER_COMMAND="brew cask install java" ;;
4242     freetype)
4243       PKGHANDLER_COMMAND="brew install freetype" ;;
4244     ccache)
4245       PKGHANDLER_COMMAND="brew install ccache" ;;
4246   esac
4247 }
4248 
4249 port_help() {
4250   PKGHANDLER_COMMAND=""
4251 }
4252 
4253 pkgutil_help() {
4254   PKGHANDLER_COMMAND=""
4255 }
4256 
4257 pkgadd_help() {
4258   PKGHANDLER_COMMAND=""
4259 }
4260 
4261 # This function will check if we're called from the "configure" wrapper while
4262 # printing --help. If so, we will print out additional information that can
4263 # only be extracted within the autoconf script, and then exit. This must be
4264 # called at the very beginning in configure.ac.
4265 
4266 
4267 
4268 
4269 
4270 
4271 #
4272 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4273 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4274 #
4275 # This code is free software; you can redistribute it and/or modify it
4276 # under the terms of the GNU General Public License version 2 only, as
4277 # published by the Free Software Foundation.  Oracle designates this
4278 # particular file as subject to the "Classpath" exception as provided
4279 # by Oracle in the LICENSE file that accompanied this code.
4280 #
4281 # This code is distributed in the hope that it will be useful, but WITHOUT
4282 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4283 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4284 # version 2 for more details (a copy is included in the LICENSE file that
4285 # accompanied this code).
4286 #
4287 # You should have received a copy of the GNU General Public License version
4288 # 2 along with this work; if not, write to the Free Software Foundation,
4289 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4290 #
4291 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4292 # or visit www.oracle.com if you need additional information or have any
4293 # questions.
4294 #
4295 
4296 # All valid JVM features, regardless of platform
4297 VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4298     graal fprof vm-structs jni-check services management all-gcs nmt cds \
4299     static-build link-time-opt aot"
4300 
4301 # All valid JVM variants
4302 VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4303 
4304 ###############################################################################
4305 # Check if the specified JVM variant should be built. To be used in shell if
4306 # constructs, like this:
4307 # if HOTSPOT_CHECK_JVM_VARIANT(server); then
4308 #
4309 # Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4310 
4311 # Definition kept in one line to allow inlining in if statements.
4312 # Additional [] needed to keep m4 from mangling shell constructs.
4313 
4314 
4315 ###############################################################################
4316 # Check if the specified JVM features are explicitly enabled. To be used in
4317 # shell if constructs, like this:
4318 # if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4319 #
4320 # Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
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 which variants of the JVM that we want to build. Available variants are:
4328 #   server: normal interpreter, and a tiered C1/C2 compiler
4329 #   client: normal interpreter, and C1 (no C2 compiler)
4330 #   minimal: reduced form of client with optional features stripped out
4331 #   core: normal interpreter only, no compiler
4332 #   zero: C++ based interpreter only, no compiler
4333 #   zeroshark: C++ based interpreter, and a llvm-based compiler
4334 #   custom: baseline JVM with no default features
4335 #
4336 
4337 
4338 ###############################################################################
4339 # Check if dtrace should be enabled and has all prerequisites present.
4340 #
4341 
4342 
4343 ################################################################################
4344 # Check if AOT should be enabled
4345 #
4346 
4347 
4348 ###############################################################################
4349 # Set up all JVM features for each JVM variant.
4350 #
4351 
4352 
4353 ###############################################################################
4354 # Validate JVM features once all setup is complete, including custom setup.
4355 #
4356 
4357 
4358 ################################################################################
4359 #
4360 # Specify which sources will be used to build the 64-bit ARM port
4361 #
4362 # --with-cpu-port=arm64   will use hotspot/src/cpu/arm
4363 # --with-cpu-port=aarch64 will use hotspot/src/cpu/aarch64
4364 #
4365 
4366 
4367 
4368 ################################################################################
4369 # Check if gtest should be built
4370 #
4371 
4372 
4373 #
4374 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4375 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4376 #
4377 # This code is free software; you can redistribute it and/or modify it
4378 # under the terms of the GNU General Public License version 2 only, as
4379 # published by the Free Software Foundation.  Oracle designates this
4380 # particular file as subject to the "Classpath" exception as provided
4381 # by Oracle in the LICENSE file that accompanied this code.
4382 #
4383 # This code is distributed in the hope that it will be useful, but WITHOUT
4384 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4385 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4386 # version 2 for more details (a copy is included in the LICENSE file that
4387 # accompanied this code).
4388 #
4389 # You should have received a copy of the GNU General Public License version
4390 # 2 along with this work; if not, write to the Free Software Foundation,
4391 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4392 #
4393 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4394 # or visit www.oracle.com if you need additional information or have any
4395 # questions.
4396 #
4397 
4398 ###############################################################################
4399 # Check which variant of the JDK that we want to build.
4400 # Currently we have:
4401 #    normal:   standard edition
4402 # but the custom make system may add other variants
4403 #
4404 # Effectively the JDK variant gives a name to a specific set of
4405 # modules to compile into the JDK.
4406 
4407 
4408 ###############################################################################
4409 # Set the debug level
4410 #    release: no debug information, all optimizations, no asserts.
4411 #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4412 #    fastdebug: debug information (-g), all optimizations, all asserts
4413 #    slowdebug: debug information (-g), no optimizations, all asserts
4414 
4415 
4416 ###############################################################################
4417 #
4418 # Should we build only OpenJDK even if closed sources are present?
4419 #
4420 
4421 
4422 
4423 
4424 ###############################################################################
4425 #
4426 # Enable or disable the elliptic curve crypto implementation
4427 #
4428 
4429 
4430 
4431 
4432 ################################################################################
4433 #
4434 # Gcov coverage data for hotspot
4435 #
4436 
4437 
4438 ################################################################################
4439 #
4440 # Static build support.  When enabled will generate static
4441 # libraries instead of shared libraries for all JDK libs.
4442 #
4443 
4444 
4445 ################################################################################
4446 #
4447 # jlink options.
4448 # We always keep packaged modules in JDK image.
4449 #
4450 
4451 
4452 ################################################################################
4453 #
4454 # Check if building of the jtreg failure handler should be enabled.
4455 #
4456 
4457 
4458 ################################################################################
4459 #
4460 # Enable or disable generation of the classlist at build time
4461 #
4462 
4463 
4464 #
4465 # Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
4466 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4467 #
4468 # This code is free software; you can redistribute it and/or modify it
4469 # under the terms of the GNU General Public License version 2 only, as
4470 # published by the Free Software Foundation.  Oracle designates this
4471 # particular file as subject to the "Classpath" exception as provided
4472 # by Oracle in the LICENSE file that accompanied this code.
4473 #
4474 # This code is distributed in the hope that it will be useful, but WITHOUT
4475 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4476 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4477 # version 2 for more details (a copy is included in the LICENSE file that
4478 # accompanied this code).
4479 #
4480 # You should have received a copy of the GNU General Public License version
4481 # 2 along with this work; if not, write to the Free Software Foundation,
4482 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4483 #
4484 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4485 # or visit www.oracle.com if you need additional information or have any
4486 # questions.
4487 #
4488 
4489 ###############################################################################
4490 #
4491 # Setup version numbers
4492 #
4493 
4494 # Verify that a given string represents a valid version number, and assign it
4495 # to a variable.
4496 
4497 # Argument 1: the variable to assign to
4498 # Argument 2: the value given by the user
4499 
4500 
4501 
4502 
4503 #
4504 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4505 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4506 #
4507 # This code is free software; you can redistribute it and/or modify it
4508 # under the terms of the GNU General Public License version 2 only, as
4509 # published by the Free Software Foundation.  Oracle designates this
4510 # particular file as subject to the "Classpath" exception as provided
4511 # by Oracle in the LICENSE file that accompanied this code.
4512 #
4513 # This code is distributed in the hope that it will be useful, but WITHOUT
4514 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4515 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4516 # version 2 for more details (a copy is included in the LICENSE file that
4517 # accompanied this code).
4518 #
4519 # You should have received a copy of the GNU General Public License version
4520 # 2 along with this work; if not, write to the Free Software Foundation,
4521 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4522 #
4523 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4524 # or visit www.oracle.com if you need additional information or have any
4525 # questions.
4526 #
4527 
4528 # Major library component reside in separate files.
4529 #
4530 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4531 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4532 #
4533 # This code is free software; you can redistribute it and/or modify it
4534 # under the terms of the GNU General Public License version 2 only, as
4535 # published by the Free Software Foundation.  Oracle designates this
4536 # particular file as subject to the "Classpath" exception as provided
4537 # by Oracle in the LICENSE file that accompanied this code.
4538 #
4539 # This code is distributed in the hope that it will be useful, but WITHOUT
4540 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4541 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4542 # version 2 for more details (a copy is included in the LICENSE file that
4543 # accompanied this code).
4544 #
4545 # You should have received a copy of the GNU General Public License version
4546 # 2 along with this work; if not, write to the Free Software Foundation,
4547 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4548 #
4549 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4550 # or visit www.oracle.com if you need additional information or have any
4551 # questions.
4552 #
4553 
4554 ################################################################################
4555 # Setup alsa (Advanced Linux Sound Architecture)
4556 ################################################################################
4557 
4558 
4559 #
4560 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4561 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4562 #
4563 # This code is free software; you can redistribute it and/or modify it
4564 # under the terms of the GNU General Public License version 2 only, as
4565 # published by the Free Software Foundation.  Oracle designates this
4566 # particular file as subject to the "Classpath" exception as provided
4567 # by Oracle in the LICENSE file that accompanied this code.
4568 #
4569 # This code is distributed in the hope that it will be useful, but WITHOUT
4570 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4571 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4572 # version 2 for more details (a copy is included in the LICENSE file that
4573 # accompanied this code).
4574 #
4575 # You should have received a copy of the GNU General Public License version
4576 # 2 along with this work; if not, write to the Free Software Foundation,
4577 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4578 #
4579 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4580 # or visit www.oracle.com if you need additional information or have any
4581 # questions.
4582 #
4583 
4584 ################################################################################
4585 # Setup bundled libraries.
4586 #
4587 # For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4588 # OpenJDK repository. Default is to use these libraries as bundled, but they
4589 # might be replaced by en external version by the user.
4590 ################################################################################
4591 
4592 
4593 ################################################################################
4594 # Setup libjpeg
4595 ################################################################################
4596 
4597 
4598 ################################################################################
4599 # Setup giflib
4600 ################################################################################
4601 
4602 
4603 ################################################################################
4604 # Setup libpng
4605 ################################################################################
4606 
4607 
4608 ################################################################################
4609 # Setup zlib
4610 ################################################################################
4611 
4612 
4613 ################################################################################
4614 # Setup lcms (Little CMS)
4615 ################################################################################
4616 
4617 
4618 #
4619 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4620 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4621 #
4622 # This code is free software; you can redistribute it and/or modify it
4623 # under the terms of the GNU General Public License version 2 only, as
4624 # published by the Free Software Foundation.  Oracle designates this
4625 # particular file as subject to the "Classpath" exception as provided
4626 # by Oracle in the LICENSE file that accompanied this code.
4627 #
4628 # This code is distributed in the hope that it will be useful, but WITHOUT
4629 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4630 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4631 # version 2 for more details (a copy is included in the LICENSE file that
4632 # accompanied this code).
4633 #
4634 # You should have received a copy of the GNU General Public License version
4635 # 2 along with this work; if not, write to the Free Software Foundation,
4636 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4637 #
4638 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4639 # or visit www.oracle.com if you need additional information or have any
4640 # questions.
4641 #
4642 
4643 ################################################################################
4644 # Setup cups (Common Unix Printing System)
4645 ################################################################################
4646 
4647 
4648 #
4649 # Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4650 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4651 #
4652 # This code is free software; you can redistribute it and/or modify it
4653 # under the terms of the GNU General Public License version 2 only, as
4654 # published by the Free Software Foundation.  Oracle designates this
4655 # particular file as subject to the "Classpath" exception as provided
4656 # by Oracle in the LICENSE file that accompanied this code.
4657 #
4658 # This code is distributed in the hope that it will be useful, but WITHOUT
4659 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4660 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4661 # version 2 for more details (a copy is included in the LICENSE file that
4662 # accompanied this code).
4663 #
4664 # You should have received a copy of the GNU General Public License version
4665 # 2 along with this work; if not, write to the Free Software Foundation,
4666 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4667 #
4668 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4669 # or visit www.oracle.com if you need additional information or have any
4670 # questions.
4671 #
4672 
4673 ################################################################################
4674 # Setup libffi (Foreign Function Interface)
4675 ################################################################################
4676 
4677 
4678 #
4679 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4680 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4681 #
4682 # This code is free software; you can redistribute it and/or modify it
4683 # under the terms of the GNU General Public License version 2 only, as
4684 # published by the Free Software Foundation.  Oracle designates this
4685 # particular file as subject to the "Classpath" exception as provided
4686 # by Oracle in the LICENSE file that accompanied this code.
4687 #
4688 # This code is distributed in the hope that it will be useful, but WITHOUT
4689 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4690 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4691 # version 2 for more details (a copy is included in the LICENSE file that
4692 # accompanied this code).
4693 #
4694 # You should have received a copy of the GNU General Public License version
4695 # 2 along with this work; if not, write to the Free Software Foundation,
4696 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4697 #
4698 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4699 # or visit www.oracle.com if you need additional information or have any
4700 # questions.
4701 #
4702 
4703 ################################################################################
4704 # Build the freetype lib from source
4705 ################################################################################
4706 
4707 
4708 ################################################################################
4709 # Check if a potential freeype library match is correct and usable
4710 ################################################################################
4711 
4712 
4713 ################################################################################
4714 # Setup freetype (The FreeType2 font rendering library)
4715 ################################################################################
4716 
4717 
4718 #
4719 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4720 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4721 #
4722 # This code is free software; you can redistribute it and/or modify it
4723 # under the terms of the GNU General Public License version 2 only, as
4724 # published by the Free Software Foundation.  Oracle designates this
4725 # particular file as subject to the "Classpath" exception as provided
4726 # by Oracle in the LICENSE file that accompanied this code.
4727 #
4728 # This code is distributed in the hope that it will be useful, but WITHOUT
4729 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4730 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4731 # version 2 for more details (a copy is included in the LICENSE file that
4732 # accompanied this code).
4733 #
4734 # You should have received a copy of the GNU General Public License version
4735 # 2 along with this work; if not, write to the Free Software Foundation,
4736 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4737 #
4738 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4739 # or visit www.oracle.com if you need additional information or have any
4740 # questions.
4741 #
4742 
4743 ################################################################################
4744 # Setup the standard C/C++ runtime libraries.
4745 #
4746 # Most importantly, determine if stdc++ should be linked statically or
4747 # dynamically.
4748 ################################################################################
4749 
4750 
4751 #
4752 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4753 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4754 #
4755 # This code is free software; you can redistribute it and/or modify it
4756 # under the terms of the GNU General Public License version 2 only, as
4757 # published by the Free Software Foundation.  Oracle designates this
4758 # particular file as subject to the "Classpath" exception as provided
4759 # by Oracle in the LICENSE file that accompanied this code.
4760 #
4761 # This code is distributed in the hope that it will be useful, but WITHOUT
4762 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4763 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4764 # version 2 for more details (a copy is included in the LICENSE file that
4765 # accompanied this code).
4766 #
4767 # You should have received a copy of the GNU General Public License version
4768 # 2 along with this work; if not, write to the Free Software Foundation,
4769 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4770 #
4771 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4772 # or visit www.oracle.com if you need additional information or have any
4773 # questions.
4774 #
4775 
4776 ################################################################################
4777 # Setup X11 Windows system
4778 ################################################################################
4779 
4780 
4781 #
4782 # Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4783 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4784 #
4785 # This code is free software; you can redistribute it and/or modify it
4786 # under the terms of the GNU General Public License version 2 only, as
4787 # published by the Free Software Foundation.  Oracle designates this
4788 # particular file as subject to the "Classpath" exception as provided
4789 # by Oracle in the LICENSE file that accompanied this code.
4790 #
4791 # This code is distributed in the hope that it will be useful, but WITHOUT
4792 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4793 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4794 # version 2 for more details (a copy is included in the LICENSE file that
4795 # accompanied this code).
4796 #
4797 # You should have received a copy of the GNU General Public License version
4798 # 2 along with this work; if not, write to the Free Software Foundation,
4799 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4800 #
4801 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4802 # or visit www.oracle.com if you need additional information or have any
4803 # questions.
4804 #
4805 
4806 ################################################################################
4807 # Setup libelf (ELF library)
4808 ################################################################################
4809 
4810 
4811 
4812 ################################################################################
4813 # Determine which libraries are needed for this configuration
4814 ################################################################################
4815 
4816 
4817 ################################################################################
4818 # Parse library options, and setup needed libraries
4819 ################################################################################
4820 
4821 
4822 ################################################################################
4823 # Setup llvm (Low-Level VM)
4824 ################################################################################
4825 
4826 
4827 ################################################################################
4828 # Setup various libraries, typically small system libraries
4829 ################################################################################
4830 
4831 
4832 ################################################################################
4833 # libstlport.so.1 is needed for running gtest on Solaris. Find it to
4834 # redistribute it in the test image.
4835 ################################################################################
4836 
4837 
4838 
4839 #
4840 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4841 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4842 #
4843 # This code is free software; you can redistribute it and/or modify it
4844 # under the terms of the GNU General Public License version 2 only, as
4845 # published by the Free Software Foundation.  Oracle designates this
4846 # particular file as subject to the "Classpath" exception as provided
4847 # by Oracle in the LICENSE file that accompanied this code.
4848 #
4849 # This code is distributed in the hope that it will be useful, but WITHOUT
4850 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4851 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4852 # version 2 for more details (a copy is included in the LICENSE file that
4853 # accompanied this code).
4854 #
4855 # You should have received a copy of the GNU General Public License version
4856 # 2 along with this work; if not, write to the Free Software Foundation,
4857 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4858 #
4859 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4860 # or visit www.oracle.com if you need additional information or have any
4861 # questions.
4862 #
4863 
4864 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4865 # Converts autoconf style CPU name to OpenJDK style, into
4866 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4867 
4868 
4869 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4870 # Converts autoconf style OS name to OpenJDK style, into
4871 # VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4872 
4873 
4874 # Expects $host_os $host_cpu $build_os and $build_cpu
4875 # and $with_target_bits to have been setup!
4876 #
4877 # Translate the standard triplet(quadruplet) definition
4878 # of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4879 # OPENJDK_BUILD_OS, etc.
4880 
4881 
4882 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4883 # accordingly. Must be done after setting up build and target system, but before
4884 # doing anything else with these values.
4885 
4886 
4887 # Setup the legacy variables, for controlling the old makefiles.
4888 #
4889 
4890 
4891 # $1 - Either TARGET or BUILD to setup the variables for.
4892 
4893 
4894 
4895 
4896 #%%% Build and target systems %%%
4897 
4898 
4899 
4900 
4901 # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4902 # Add -mX to various FLAGS variables.
4903 
4904 
4905 
4906 
4907 
4908 
4909 #
4910 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4911 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4912 #
4913 # This code is free software; you can redistribute it and/or modify it
4914 # under the terms of the GNU General Public License version 2 only, as
4915 # published by the Free Software Foundation.  Oracle designates this
4916 # particular file as subject to the "Classpath" exception as provided
4917 # by Oracle in the LICENSE file that accompanied this code.
4918 #
4919 # This code is distributed in the hope that it will be useful, but WITHOUT
4920 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4921 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4922 # version 2 for more details (a copy is included in the LICENSE file that
4923 # accompanied this code).
4924 #
4925 # You should have received a copy of the GNU General Public License version
4926 # 2 along with this work; if not, write to the Free Software Foundation,
4927 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4928 #
4929 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4930 # or visit www.oracle.com if you need additional information or have any
4931 # questions.
4932 #
4933 
4934 
4935 
4936 
4937 
4938 
4939 
4940 ################################################################################
4941 # Define a mechanism for importing extra prebuilt modules
4942 #
4943 
4944 
4945 
4946 #
4947 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4948 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4949 #
4950 # This code is free software; you can redistribute it and/or modify it
4951 # under the terms of the GNU General Public License version 2 only, as
4952 # published by the Free Software Foundation.  Oracle designates this
4953 # particular file as subject to the "Classpath" exception as provided
4954 # by Oracle in the LICENSE file that accompanied this code.
4955 #
4956 # This code is distributed in the hope that it will be useful, but WITHOUT
4957 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4958 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4959 # version 2 for more details (a copy is included in the LICENSE file that
4960 # accompanied this code).
4961 #
4962 # You should have received a copy of the GNU General Public License version
4963 # 2 along with this work; if not, write to the Free Software Foundation,
4964 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4965 #
4966 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4967 # or visit www.oracle.com if you need additional information or have any
4968 # questions.
4969 #
4970 
4971 ########################################################################
4972 # This file is responsible for detecting, verifying and setting up the
4973 # toolchain, i.e. the compiler, linker and related utilities. It will setup
4974 # proper paths to the binaries, but it will not setup any flags.
4975 #
4976 # The binaries used is determined by the toolchain type, which is the family of
4977 # compilers and related tools that are used.
4978 ########################################################################
4979 
4980 
4981 # All valid toolchains, regardless of platform (used by help.m4)
4982 VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4983 
4984 # These toolchains are valid on different platforms
4985 VALID_TOOLCHAINS_linux="gcc clang"
4986 VALID_TOOLCHAINS_solaris="solstudio"
4987 VALID_TOOLCHAINS_macosx="gcc clang"
4988 VALID_TOOLCHAINS_aix="xlc"
4989 VALID_TOOLCHAINS_windows="microsoft"
4990 
4991 # Toolchain descriptions
4992 TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4993 TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4994 TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4995 TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4996 TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4997 
4998 # Minimum supported versions, empty means unspecified
4999 TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
5000 TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
5001 TOOLCHAIN_MINIMUM_VERSION_microsoft="16.00.30319.01" # VS2010
5002 TOOLCHAIN_MINIMUM_VERSION_solstudio="5.13"
5003 TOOLCHAIN_MINIMUM_VERSION_xlc=""
5004 
5005 # Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
5006 # Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
5007 # $1 - optional variable prefix for compiler and version variables (BUILD_)
5008 # $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
5009 
5010 
5011 # Check if the configured compiler (C and C++) is of a specific version or
5012 # newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
5013 #
5014 # Arguments:
5015 #   VERSION:   The version string to check against the found version
5016 #   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
5017 #   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
5018 #   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
5019 
5020 
5021 
5022 
5023 # Setup a number of variables describing how native output files are
5024 # named on this platform/toolchain.
5025 
5026 
5027 # Determine which toolchain type to use, and make sure it is valid for this
5028 # platform. Setup various information about the selected toolchain.
5029 
5030 
5031 # Before we start detecting the toolchain executables, we might need some
5032 # special setup, e.g. additional paths etc.
5033 
5034 
5035 # Restore path, etc
5036 
5037 
5038 # Check if a compiler is of the toolchain type we expect, and save the version
5039 # information from it. If the compiler does not match the expected type,
5040 # this function will abort using AC_MSG_ERROR. If it matches, the version will
5041 # be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
5042 # the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
5043 #
5044 # $1 = compiler to test (CC or CXX)
5045 # $2 = human readable name of compiler (C or C++)
5046 
5047 
5048 # Try to locate the given C or C++ compiler in the path, or otherwise.
5049 #
5050 # $1 = compiler to test (CC or CXX)
5051 # $2 = human readable name of compiler (C or C++)
5052 # $3 = compiler name to search for
5053 
5054 
5055 # Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
5056 # preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
5057 # archiver (AR). Verify that the compilers are correct according to the
5058 # toolchain type.
5059 
5060 
5061 # Setup additional tools that is considered a part of the toolchain, but not the
5062 # core part. Many of these are highly platform-specific and do not exist,
5063 # and/or are not needed on all platforms.
5064 
5065 
5066 # Setup the build tools (i.e, the compiler and linker used to build programs
5067 # that should be run on the build platform, not the target platform, as a build
5068 # helper). Since the non-cross-compile case uses the normal, target compilers
5069 # for this, we can only do this after these have been setup.
5070 
5071 
5072 # Do some additional checks on the detected tools.
5073 
5074 
5075 # Setup the JTReg Regression Test Harness.
5076 
5077 
5078 #
5079 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
5080 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5081 #
5082 # This code is free software; you can redistribute it and/or modify it
5083 # under the terms of the GNU General Public License version 2 only, as
5084 # published by the Free Software Foundation.  Oracle designates this
5085 # particular file as subject to the "Classpath" exception as provided
5086 # by Oracle in the LICENSE file that accompanied this code.
5087 #
5088 # This code is distributed in the hope that it will be useful, but WITHOUT
5089 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5090 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5091 # version 2 for more details (a copy is included in the LICENSE file that
5092 # accompanied this code).
5093 #
5094 # You should have received a copy of the GNU General Public License version
5095 # 2 along with this work; if not, write to the Free Software Foundation,
5096 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5097 #
5098 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5099 # or visit www.oracle.com if you need additional information or have any
5100 # questions.
5101 #
5102 
5103 ################################################################################
5104 # The order of these defines the priority by which we try to find them.
5105 VALID_VS_VERSIONS="2013 2012 2010"
5106 
5107 VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5108 VS_VERSION_INTERNAL_2010=100
5109 VS_MSVCR_2010=msvcr100.dll
5110 # We don't use msvcp on Visual Studio 2010
5111 #VS_MSVCP_2010=msvcp100.dll
5112 VS_ENVVAR_2010="VS100COMNTOOLS"
5113 VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5114 VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5115 VS_VS_PLATFORM_NAME_2010="v100"
5116 VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5117 
5118 VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5119 VS_VERSION_INTERNAL_2012=110
5120 VS_MSVCR_2012=msvcr110.dll
5121 VS_MSVCP_2012=msvcp110.dll
5122 VS_ENVVAR_2012="VS110COMNTOOLS"
5123 VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5124 VS_SDK_INSTALLDIR_2012=
5125 VS_VS_PLATFORM_NAME_2012="v110"
5126 VS_SDK_PLATFORM_NAME_2012=
5127 
5128 VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5129 VS_VERSION_INTERNAL_2013=120
5130 VS_MSVCR_2013=msvcr120.dll
5131 VS_MSVCP_2013=msvcp120.dll
5132 VS_ENVVAR_2013="VS120COMNTOOLS"
5133 VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5134 VS_SDK_INSTALLDIR_2013=
5135 VS_VS_PLATFORM_NAME_2013="v120"
5136 VS_SDK_PLATFORM_NAME_2013=
5137 
5138 ################################################################################
5139 
5140 
5141 
5142 ################################################################################
5143 
5144 
5145 
5146 ################################################################################
5147 # Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5148 # build environment and assigns it to VS_ENV_CMD
5149 
5150 
5151 ################################################################################
5152 
5153 
5154 
5155 ################################################################################
5156 # Check if the VS env variables were setup prior to running configure.
5157 # If not, then find vcvarsall.bat and run it automatically, and integrate
5158 # the set env variables into the spec file.
5159 
5160 
5161 
5162 
5163 
5164 
5165 
5166 
5167 
5168 
5169 
5170 
5171 
5172 
5173 # This line needs to be here, verbatim, after all includes and the dummy hook
5174 # definitions. It is replaced with custom functionality when building
5175 # custom sources.
5176 #CUSTOM_AUTOCONF_INCLUDE
5177 
5178 # Do not change or remove the following line, it is needed for consistency checks:
5179 DATE_WHEN_GENERATED=1490712090
5180 
5181 ###############################################################################
5182 #
5183 # Initialization / Boot-strapping
5184 #
5185 # The bootstrapping process needs to solve the "chicken or the egg" problem,
5186 # thus it jumps back and forth, each time gaining something needed later on.
5187 #
5188 ###############################################################################
5189 
5190 # If we are requested to print additional help, do that and then exit.
5191 # This must be the very first call.
5192 
5193   if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5194 
5195     # Print available toolchains
5196     $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5197     $PRINTF "Which are valid to use depends on the build platform.\n"
5198     for toolchain in $VALID_TOOLCHAINS_all; do
5199       # Use indirect variable referencing
5200       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5201       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5202       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5203     done
5204     $PRINTF "\n"
5205 
5206     # Print available jvm features
5207     $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5208     $PRINTF "Which are valid to use depends on the target platform.\n  "
5209     $PRINTF "%s " $VALID_JVM_FEATURES
5210     $PRINTF "\n"
5211 
5212     # And now exit directly
5213     exit 0
5214   fi
5215 
5216 
5217 # Basic initialization that must happen first of all in the normal process.
5218 
5219   # Save the original command line. This is passed to us by the wrapper configure script.
5220 
5221   # Save the path variable before it gets changed
5222   ORIGINAL_PATH="$PATH"
5223 
5224   DATE_WHEN_CONFIGURED=`LANG=C date`
5225 
5226   { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5227 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5228   { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5229 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5230 
5231 
5232   # Start with tools that do not need have cross compilation support
5233   # and can be expected to be found in the default PATH. These tools are
5234   # used by configure.
5235 
5236   # First are all the simple required tools.
5237 
5238 
5239 
5240   # Publish this variable in the help.
5241 
5242 
5243   if [ -z "${BASENAME+x}" ]; then
5244     # The variable is not set by user, try to locate tool using the code snippet
5245     for ac_prog in basename
5246 do
5247   # Extract the first word of "$ac_prog", so it can be a program name with args.
5248 set dummy $ac_prog; ac_word=$2
5249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5250 $as_echo_n "checking for $ac_word... " >&6; }
5251 if ${ac_cv_path_BASENAME+:} false; then :
5252   $as_echo_n "(cached) " >&6
5253 else
5254   case $BASENAME in
5255   [\\/]* | ?:[\\/]*)
5256   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5257   ;;
5258   *)
5259   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5260 for as_dir in $PATH
5261 do
5262   IFS=$as_save_IFS
5263   test -z "$as_dir" && as_dir=.
5264     for ac_exec_ext in '' $ac_executable_extensions; do
5265   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5266     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5267     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5268     break 2
5269   fi
5270 done
5271   done
5272 IFS=$as_save_IFS
5273 
5274   ;;
5275 esac
5276 fi
5277 BASENAME=$ac_cv_path_BASENAME
5278 if test -n "$BASENAME"; then
5279   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5280 $as_echo "$BASENAME" >&6; }
5281 else
5282   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5283 $as_echo "no" >&6; }
5284 fi
5285 
5286 
5287   test -n "$BASENAME" && break
5288 done
5289 
5290   else
5291     # The variable is set, but is it from the command line or the environment?
5292 
5293     # Try to remove the string !BASENAME! from our list.
5294     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5295     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5296       # If it failed, the variable was not from the command line. Ignore it,
5297       # but warn the user (except for BASH, which is always set by the calling BASH).
5298       if test "xBASENAME" != xBASH; then
5299         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5300 $as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5301       fi
5302       # Try to locate tool using the code snippet
5303       for ac_prog in basename
5304 do
5305   # Extract the first word of "$ac_prog", so it can be a program name with args.
5306 set dummy $ac_prog; ac_word=$2
5307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5308 $as_echo_n "checking for $ac_word... " >&6; }
5309 if ${ac_cv_path_BASENAME+:} false; then :
5310   $as_echo_n "(cached) " >&6
5311 else
5312   case $BASENAME in
5313   [\\/]* | ?:[\\/]*)
5314   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5315   ;;
5316   *)
5317   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5318 for as_dir in $PATH
5319 do
5320   IFS=$as_save_IFS
5321   test -z "$as_dir" && as_dir=.
5322     for ac_exec_ext in '' $ac_executable_extensions; do
5323   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5324     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5325     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5326     break 2
5327   fi
5328 done
5329   done
5330 IFS=$as_save_IFS
5331 
5332   ;;
5333 esac
5334 fi
5335 BASENAME=$ac_cv_path_BASENAME
5336 if test -n "$BASENAME"; then
5337   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5338 $as_echo "$BASENAME" >&6; }
5339 else
5340   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5341 $as_echo "no" >&6; }
5342 fi
5343 
5344 
5345   test -n "$BASENAME" && break
5346 done
5347 
5348     else
5349       # If it succeeded, then it was overridden by the user. We will use it
5350       # for the tool.
5351 
5352       # First remove it from the list of overridden variables, so we can test
5353       # for unknown variables in the end.
5354       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5355 
5356       # Check if we try to supply an empty value
5357       if test "x$BASENAME" = x; then
5358         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5359 $as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5360         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5361 $as_echo_n "checking for BASENAME... " >&6; }
5362         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5363 $as_echo "disabled" >&6; }
5364       else
5365         # Check if the provided tool contains a complete path.
5366         tool_specified="$BASENAME"
5367         tool_basename="${tool_specified##*/}"
5368         if test "x$tool_basename" = "x$tool_specified"; then
5369           # A command without a complete path is provided, search $PATH.
5370           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5371 $as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5372           # Extract the first word of "$tool_basename", so it can be a program name with args.
5373 set dummy $tool_basename; ac_word=$2
5374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5375 $as_echo_n "checking for $ac_word... " >&6; }
5376 if ${ac_cv_path_BASENAME+:} false; then :
5377   $as_echo_n "(cached) " >&6
5378 else
5379   case $BASENAME in
5380   [\\/]* | ?:[\\/]*)
5381   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5382   ;;
5383   *)
5384   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5385 for as_dir in $PATH
5386 do
5387   IFS=$as_save_IFS
5388   test -z "$as_dir" && as_dir=.
5389     for ac_exec_ext in '' $ac_executable_extensions; do
5390   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5391     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5392     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5393     break 2
5394   fi
5395 done
5396   done
5397 IFS=$as_save_IFS
5398 
5399   ;;
5400 esac
5401 fi
5402 BASENAME=$ac_cv_path_BASENAME
5403 if test -n "$BASENAME"; then
5404   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5405 $as_echo "$BASENAME" >&6; }
5406 else
5407   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5408 $as_echo "no" >&6; }
5409 fi
5410 
5411 
5412           if test "x$BASENAME" = x; then
5413             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5414           fi
5415         else
5416           # Otherwise we believe it is a complete path. Use it as it is.
5417           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5418 $as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5419           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5420 $as_echo_n "checking for BASENAME... " >&6; }
5421           if test ! -x "$tool_specified"; then
5422             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5423 $as_echo "not found" >&6; }
5424             as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5425           fi
5426           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5427 $as_echo "$tool_specified" >&6; }
5428         fi
5429       fi
5430     fi
5431 
5432   fi
5433 
5434 
5435 
5436   if test "x$BASENAME" = x; then
5437     as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5438   fi
5439 
5440 
5441 
5442 
5443 
5444   # Publish this variable in the help.
5445 
5446 
5447   if [ -z "${BASH+x}" ]; then
5448     # The variable is not set by user, try to locate tool using the code snippet
5449     for ac_prog in bash
5450 do
5451   # Extract the first word of "$ac_prog", so it can be a program name with args.
5452 set dummy $ac_prog; ac_word=$2
5453 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5454 $as_echo_n "checking for $ac_word... " >&6; }
5455 if ${ac_cv_path_BASH+:} false; then :
5456   $as_echo_n "(cached) " >&6
5457 else
5458   case $BASH in
5459   [\\/]* | ?:[\\/]*)
5460   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5461   ;;
5462   *)
5463   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5464 for as_dir in $PATH
5465 do
5466   IFS=$as_save_IFS
5467   test -z "$as_dir" && as_dir=.
5468     for ac_exec_ext in '' $ac_executable_extensions; do
5469   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5470     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5471     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5472     break 2
5473   fi
5474 done
5475   done
5476 IFS=$as_save_IFS
5477 
5478   ;;
5479 esac
5480 fi
5481 BASH=$ac_cv_path_BASH
5482 if test -n "$BASH"; then
5483   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5484 $as_echo "$BASH" >&6; }
5485 else
5486   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5487 $as_echo "no" >&6; }
5488 fi
5489 
5490 
5491   test -n "$BASH" && break
5492 done
5493 
5494   else
5495     # The variable is set, but is it from the command line or the environment?
5496 
5497     # Try to remove the string !BASH! from our list.
5498     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5499     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5500       # If it failed, the variable was not from the command line. Ignore it,
5501       # but warn the user (except for BASH, which is always set by the calling BASH).
5502       if test "xBASH" != xBASH; then
5503         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5504 $as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5505       fi
5506       # Try to locate tool using the code snippet
5507       for ac_prog in bash
5508 do
5509   # Extract the first word of "$ac_prog", so it can be a program name with args.
5510 set dummy $ac_prog; ac_word=$2
5511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5512 $as_echo_n "checking for $ac_word... " >&6; }
5513 if ${ac_cv_path_BASH+:} false; then :
5514   $as_echo_n "(cached) " >&6
5515 else
5516   case $BASH in
5517   [\\/]* | ?:[\\/]*)
5518   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5519   ;;
5520   *)
5521   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5522 for as_dir in $PATH
5523 do
5524   IFS=$as_save_IFS
5525   test -z "$as_dir" && as_dir=.
5526     for ac_exec_ext in '' $ac_executable_extensions; do
5527   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5528     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5529     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5530     break 2
5531   fi
5532 done
5533   done
5534 IFS=$as_save_IFS
5535 
5536   ;;
5537 esac
5538 fi
5539 BASH=$ac_cv_path_BASH
5540 if test -n "$BASH"; then
5541   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5542 $as_echo "$BASH" >&6; }
5543 else
5544   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5545 $as_echo "no" >&6; }
5546 fi
5547 
5548 
5549   test -n "$BASH" && break
5550 done
5551 
5552     else
5553       # If it succeeded, then it was overridden by the user. We will use it
5554       # for the tool.
5555 
5556       # First remove it from the list of overridden variables, so we can test
5557       # for unknown variables in the end.
5558       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5559 
5560       # Check if we try to supply an empty value
5561       if test "x$BASH" = x; then
5562         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5563 $as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5564         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5565 $as_echo_n "checking for BASH... " >&6; }
5566         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5567 $as_echo "disabled" >&6; }
5568       else
5569         # Check if the provided tool contains a complete path.
5570         tool_specified="$BASH"
5571         tool_basename="${tool_specified##*/}"
5572         if test "x$tool_basename" = "x$tool_specified"; then
5573           # A command without a complete path is provided, search $PATH.
5574           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5575 $as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5576           # Extract the first word of "$tool_basename", so it can be a program name with args.
5577 set dummy $tool_basename; ac_word=$2
5578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5579 $as_echo_n "checking for $ac_word... " >&6; }
5580 if ${ac_cv_path_BASH+:} false; then :
5581   $as_echo_n "(cached) " >&6
5582 else
5583   case $BASH in
5584   [\\/]* | ?:[\\/]*)
5585   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5586   ;;
5587   *)
5588   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5589 for as_dir in $PATH
5590 do
5591   IFS=$as_save_IFS
5592   test -z "$as_dir" && as_dir=.
5593     for ac_exec_ext in '' $ac_executable_extensions; do
5594   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5595     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5596     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5597     break 2
5598   fi
5599 done
5600   done
5601 IFS=$as_save_IFS
5602 
5603   ;;
5604 esac
5605 fi
5606 BASH=$ac_cv_path_BASH
5607 if test -n "$BASH"; then
5608   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5609 $as_echo "$BASH" >&6; }
5610 else
5611   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5612 $as_echo "no" >&6; }
5613 fi
5614 
5615 
5616           if test "x$BASH" = x; then
5617             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5618           fi
5619         else
5620           # Otherwise we believe it is a complete path. Use it as it is.
5621           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5622 $as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5623           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5624 $as_echo_n "checking for BASH... " >&6; }
5625           if test ! -x "$tool_specified"; then
5626             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5627 $as_echo "not found" >&6; }
5628             as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5629           fi
5630           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5631 $as_echo "$tool_specified" >&6; }
5632         fi
5633       fi
5634     fi
5635 
5636   fi
5637 
5638 
5639 
5640   if test "x$BASH" = x; then
5641     as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5642   fi
5643 
5644 
5645 
5646 
5647 
5648   # Publish this variable in the help.
5649 
5650 
5651   if [ -z "${CAT+x}" ]; then
5652     # The variable is not set by user, try to locate tool using the code snippet
5653     for ac_prog in cat
5654 do
5655   # Extract the first word of "$ac_prog", so it can be a program name with args.
5656 set dummy $ac_prog; ac_word=$2
5657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5658 $as_echo_n "checking for $ac_word... " >&6; }
5659 if ${ac_cv_path_CAT+:} false; then :
5660   $as_echo_n "(cached) " >&6
5661 else
5662   case $CAT in
5663   [\\/]* | ?:[\\/]*)
5664   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5665   ;;
5666   *)
5667   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5668 for as_dir in $PATH
5669 do
5670   IFS=$as_save_IFS
5671   test -z "$as_dir" && as_dir=.
5672     for ac_exec_ext in '' $ac_executable_extensions; do
5673   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5674     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5675     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5676     break 2
5677   fi
5678 done
5679   done
5680 IFS=$as_save_IFS
5681 
5682   ;;
5683 esac
5684 fi
5685 CAT=$ac_cv_path_CAT
5686 if test -n "$CAT"; then
5687   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5688 $as_echo "$CAT" >&6; }
5689 else
5690   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5691 $as_echo "no" >&6; }
5692 fi
5693 
5694 
5695   test -n "$CAT" && break
5696 done
5697 
5698   else
5699     # The variable is set, but is it from the command line or the environment?
5700 
5701     # Try to remove the string !CAT! from our list.
5702     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5703     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5704       # If it failed, the variable was not from the command line. Ignore it,
5705       # but warn the user (except for BASH, which is always set by the calling BASH).
5706       if test "xCAT" != xBASH; then
5707         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5708 $as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5709       fi
5710       # Try to locate tool using the code snippet
5711       for ac_prog in cat
5712 do
5713   # Extract the first word of "$ac_prog", so it can be a program name with args.
5714 set dummy $ac_prog; ac_word=$2
5715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5716 $as_echo_n "checking for $ac_word... " >&6; }
5717 if ${ac_cv_path_CAT+:} false; then :
5718   $as_echo_n "(cached) " >&6
5719 else
5720   case $CAT in
5721   [\\/]* | ?:[\\/]*)
5722   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5723   ;;
5724   *)
5725   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5726 for as_dir in $PATH
5727 do
5728   IFS=$as_save_IFS
5729   test -z "$as_dir" && as_dir=.
5730     for ac_exec_ext in '' $ac_executable_extensions; do
5731   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5732     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5733     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5734     break 2
5735   fi
5736 done
5737   done
5738 IFS=$as_save_IFS
5739 
5740   ;;
5741 esac
5742 fi
5743 CAT=$ac_cv_path_CAT
5744 if test -n "$CAT"; then
5745   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5746 $as_echo "$CAT" >&6; }
5747 else
5748   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5749 $as_echo "no" >&6; }
5750 fi
5751 
5752 
5753   test -n "$CAT" && break
5754 done
5755 
5756     else
5757       # If it succeeded, then it was overridden by the user. We will use it
5758       # for the tool.
5759 
5760       # First remove it from the list of overridden variables, so we can test
5761       # for unknown variables in the end.
5762       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5763 
5764       # Check if we try to supply an empty value
5765       if test "x$CAT" = x; then
5766         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5767 $as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5768         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5769 $as_echo_n "checking for CAT... " >&6; }
5770         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5771 $as_echo "disabled" >&6; }
5772       else
5773         # Check if the provided tool contains a complete path.
5774         tool_specified="$CAT"
5775         tool_basename="${tool_specified##*/}"
5776         if test "x$tool_basename" = "x$tool_specified"; then
5777           # A command without a complete path is provided, search $PATH.
5778           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5779 $as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5780           # Extract the first word of "$tool_basename", so it can be a program name with args.
5781 set dummy $tool_basename; ac_word=$2
5782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5783 $as_echo_n "checking for $ac_word... " >&6; }
5784 if ${ac_cv_path_CAT+:} false; then :
5785   $as_echo_n "(cached) " >&6
5786 else
5787   case $CAT in
5788   [\\/]* | ?:[\\/]*)
5789   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5790   ;;
5791   *)
5792   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5793 for as_dir in $PATH
5794 do
5795   IFS=$as_save_IFS
5796   test -z "$as_dir" && as_dir=.
5797     for ac_exec_ext in '' $ac_executable_extensions; do
5798   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5799     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5800     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5801     break 2
5802   fi
5803 done
5804   done
5805 IFS=$as_save_IFS
5806 
5807   ;;
5808 esac
5809 fi
5810 CAT=$ac_cv_path_CAT
5811 if test -n "$CAT"; then
5812   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5813 $as_echo "$CAT" >&6; }
5814 else
5815   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5816 $as_echo "no" >&6; }
5817 fi
5818 
5819 
5820           if test "x$CAT" = x; then
5821             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5822           fi
5823         else
5824           # Otherwise we believe it is a complete path. Use it as it is.
5825           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5826 $as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5827           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5828 $as_echo_n "checking for CAT... " >&6; }
5829           if test ! -x "$tool_specified"; then
5830             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5831 $as_echo "not found" >&6; }
5832             as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5833           fi
5834           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5835 $as_echo "$tool_specified" >&6; }
5836         fi
5837       fi
5838     fi
5839 
5840   fi
5841 
5842 
5843 
5844   if test "x$CAT" = x; then
5845     as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5846   fi
5847 
5848 
5849 
5850 
5851 
5852   # Publish this variable in the help.
5853 
5854 
5855   if [ -z "${CHMOD+x}" ]; then
5856     # The variable is not set by user, try to locate tool using the code snippet
5857     for ac_prog in chmod
5858 do
5859   # Extract the first word of "$ac_prog", so it can be a program name with args.
5860 set dummy $ac_prog; ac_word=$2
5861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5862 $as_echo_n "checking for $ac_word... " >&6; }
5863 if ${ac_cv_path_CHMOD+:} false; then :
5864   $as_echo_n "(cached) " >&6
5865 else
5866   case $CHMOD in
5867   [\\/]* | ?:[\\/]*)
5868   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5869   ;;
5870   *)
5871   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5872 for as_dir in $PATH
5873 do
5874   IFS=$as_save_IFS
5875   test -z "$as_dir" && as_dir=.
5876     for ac_exec_ext in '' $ac_executable_extensions; do
5877   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5878     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5879     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5880     break 2
5881   fi
5882 done
5883   done
5884 IFS=$as_save_IFS
5885 
5886   ;;
5887 esac
5888 fi
5889 CHMOD=$ac_cv_path_CHMOD
5890 if test -n "$CHMOD"; then
5891   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5892 $as_echo "$CHMOD" >&6; }
5893 else
5894   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5895 $as_echo "no" >&6; }
5896 fi
5897 
5898 
5899   test -n "$CHMOD" && break
5900 done
5901 
5902   else
5903     # The variable is set, but is it from the command line or the environment?
5904 
5905     # Try to remove the string !CHMOD! from our list.
5906     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5907     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5908       # If it failed, the variable was not from the command line. Ignore it,
5909       # but warn the user (except for BASH, which is always set by the calling BASH).
5910       if test "xCHMOD" != xBASH; then
5911         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5912 $as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5913       fi
5914       # Try to locate tool using the code snippet
5915       for ac_prog in chmod
5916 do
5917   # Extract the first word of "$ac_prog", so it can be a program name with args.
5918 set dummy $ac_prog; ac_word=$2
5919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5920 $as_echo_n "checking for $ac_word... " >&6; }
5921 if ${ac_cv_path_CHMOD+:} false; then :
5922   $as_echo_n "(cached) " >&6
5923 else
5924   case $CHMOD in
5925   [\\/]* | ?:[\\/]*)
5926   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5927   ;;
5928   *)
5929   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5930 for as_dir in $PATH
5931 do
5932   IFS=$as_save_IFS
5933   test -z "$as_dir" && as_dir=.
5934     for ac_exec_ext in '' $ac_executable_extensions; do
5935   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5936     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5937     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5938     break 2
5939   fi
5940 done
5941   done
5942 IFS=$as_save_IFS
5943 
5944   ;;
5945 esac
5946 fi
5947 CHMOD=$ac_cv_path_CHMOD
5948 if test -n "$CHMOD"; then
5949   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5950 $as_echo "$CHMOD" >&6; }
5951 else
5952   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5953 $as_echo "no" >&6; }
5954 fi
5955 
5956 
5957   test -n "$CHMOD" && break
5958 done
5959 
5960     else
5961       # If it succeeded, then it was overridden by the user. We will use it
5962       # for the tool.
5963 
5964       # First remove it from the list of overridden variables, so we can test
5965       # for unknown variables in the end.
5966       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5967 
5968       # Check if we try to supply an empty value
5969       if test "x$CHMOD" = x; then
5970         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5971 $as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5972         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5973 $as_echo_n "checking for CHMOD... " >&6; }
5974         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5975 $as_echo "disabled" >&6; }
5976       else
5977         # Check if the provided tool contains a complete path.
5978         tool_specified="$CHMOD"
5979         tool_basename="${tool_specified##*/}"
5980         if test "x$tool_basename" = "x$tool_specified"; then
5981           # A command without a complete path is provided, search $PATH.
5982           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5983 $as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5984           # Extract the first word of "$tool_basename", so it can be a program name with args.
5985 set dummy $tool_basename; ac_word=$2
5986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5987 $as_echo_n "checking for $ac_word... " >&6; }
5988 if ${ac_cv_path_CHMOD+:} false; then :
5989   $as_echo_n "(cached) " >&6
5990 else
5991   case $CHMOD in
5992   [\\/]* | ?:[\\/]*)
5993   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5994   ;;
5995   *)
5996   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5997 for as_dir in $PATH
5998 do
5999   IFS=$as_save_IFS
6000   test -z "$as_dir" && as_dir=.
6001     for ac_exec_ext in '' $ac_executable_extensions; do
6002   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6003     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
6004     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6005     break 2
6006   fi
6007 done
6008   done
6009 IFS=$as_save_IFS
6010 
6011   ;;
6012 esac
6013 fi
6014 CHMOD=$ac_cv_path_CHMOD
6015 if test -n "$CHMOD"; then
6016   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
6017 $as_echo "$CHMOD" >&6; }
6018 else
6019   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6020 $as_echo "no" >&6; }
6021 fi
6022 
6023 
6024           if test "x$CHMOD" = x; then
6025             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6026           fi
6027         else
6028           # Otherwise we believe it is a complete path. Use it as it is.
6029           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
6030 $as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
6031           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
6032 $as_echo_n "checking for CHMOD... " >&6; }
6033           if test ! -x "$tool_specified"; then
6034             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6035 $as_echo "not found" >&6; }
6036             as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
6037           fi
6038           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6039 $as_echo "$tool_specified" >&6; }
6040         fi
6041       fi
6042     fi
6043 
6044   fi
6045 
6046 
6047 
6048   if test "x$CHMOD" = x; then
6049     as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
6050   fi
6051 
6052 
6053 
6054 
6055 
6056   # Publish this variable in the help.
6057 
6058 
6059   if [ -z "${CMP+x}" ]; then
6060     # The variable is not set by user, try to locate tool using the code snippet
6061     for ac_prog in cmp
6062 do
6063   # Extract the first word of "$ac_prog", so it can be a program name with args.
6064 set dummy $ac_prog; ac_word=$2
6065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6066 $as_echo_n "checking for $ac_word... " >&6; }
6067 if ${ac_cv_path_CMP+:} false; then :
6068   $as_echo_n "(cached) " >&6
6069 else
6070   case $CMP in
6071   [\\/]* | ?:[\\/]*)
6072   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6073   ;;
6074   *)
6075   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6076 for as_dir in $PATH
6077 do
6078   IFS=$as_save_IFS
6079   test -z "$as_dir" && as_dir=.
6080     for ac_exec_ext in '' $ac_executable_extensions; do
6081   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6082     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6083     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6084     break 2
6085   fi
6086 done
6087   done
6088 IFS=$as_save_IFS
6089 
6090   ;;
6091 esac
6092 fi
6093 CMP=$ac_cv_path_CMP
6094 if test -n "$CMP"; then
6095   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6096 $as_echo "$CMP" >&6; }
6097 else
6098   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6099 $as_echo "no" >&6; }
6100 fi
6101 
6102 
6103   test -n "$CMP" && break
6104 done
6105 
6106   else
6107     # The variable is set, but is it from the command line or the environment?
6108 
6109     # Try to remove the string !CMP! from our list.
6110     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6111     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6112       # If it failed, the variable was not from the command line. Ignore it,
6113       # but warn the user (except for BASH, which is always set by the calling BASH).
6114       if test "xCMP" != xBASH; then
6115         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6116 $as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6117       fi
6118       # Try to locate tool using the code snippet
6119       for ac_prog in cmp
6120 do
6121   # Extract the first word of "$ac_prog", so it can be a program name with args.
6122 set dummy $ac_prog; ac_word=$2
6123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6124 $as_echo_n "checking for $ac_word... " >&6; }
6125 if ${ac_cv_path_CMP+:} false; then :
6126   $as_echo_n "(cached) " >&6
6127 else
6128   case $CMP in
6129   [\\/]* | ?:[\\/]*)
6130   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6131   ;;
6132   *)
6133   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6134 for as_dir in $PATH
6135 do
6136   IFS=$as_save_IFS
6137   test -z "$as_dir" && as_dir=.
6138     for ac_exec_ext in '' $ac_executable_extensions; do
6139   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6140     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6141     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6142     break 2
6143   fi
6144 done
6145   done
6146 IFS=$as_save_IFS
6147 
6148   ;;
6149 esac
6150 fi
6151 CMP=$ac_cv_path_CMP
6152 if test -n "$CMP"; then
6153   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6154 $as_echo "$CMP" >&6; }
6155 else
6156   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6157 $as_echo "no" >&6; }
6158 fi
6159 
6160 
6161   test -n "$CMP" && break
6162 done
6163 
6164     else
6165       # If it succeeded, then it was overridden by the user. We will use it
6166       # for the tool.
6167 
6168       # First remove it from the list of overridden variables, so we can test
6169       # for unknown variables in the end.
6170       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6171 
6172       # Check if we try to supply an empty value
6173       if test "x$CMP" = x; then
6174         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6175 $as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6176         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6177 $as_echo_n "checking for CMP... " >&6; }
6178         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6179 $as_echo "disabled" >&6; }
6180       else
6181         # Check if the provided tool contains a complete path.
6182         tool_specified="$CMP"
6183         tool_basename="${tool_specified##*/}"
6184         if test "x$tool_basename" = "x$tool_specified"; then
6185           # A command without a complete path is provided, search $PATH.
6186           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6187 $as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6188           # Extract the first word of "$tool_basename", so it can be a program name with args.
6189 set dummy $tool_basename; ac_word=$2
6190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6191 $as_echo_n "checking for $ac_word... " >&6; }
6192 if ${ac_cv_path_CMP+:} false; then :
6193   $as_echo_n "(cached) " >&6
6194 else
6195   case $CMP in
6196   [\\/]* | ?:[\\/]*)
6197   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6198   ;;
6199   *)
6200   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6201 for as_dir in $PATH
6202 do
6203   IFS=$as_save_IFS
6204   test -z "$as_dir" && as_dir=.
6205     for ac_exec_ext in '' $ac_executable_extensions; do
6206   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6207     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6208     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6209     break 2
6210   fi
6211 done
6212   done
6213 IFS=$as_save_IFS
6214 
6215   ;;
6216 esac
6217 fi
6218 CMP=$ac_cv_path_CMP
6219 if test -n "$CMP"; then
6220   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6221 $as_echo "$CMP" >&6; }
6222 else
6223   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6224 $as_echo "no" >&6; }
6225 fi
6226 
6227 
6228           if test "x$CMP" = x; then
6229             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6230           fi
6231         else
6232           # Otherwise we believe it is a complete path. Use it as it is.
6233           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6234 $as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6235           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6236 $as_echo_n "checking for CMP... " >&6; }
6237           if test ! -x "$tool_specified"; then
6238             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6239 $as_echo "not found" >&6; }
6240             as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6241           fi
6242           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6243 $as_echo "$tool_specified" >&6; }
6244         fi
6245       fi
6246     fi
6247 
6248   fi
6249 
6250 
6251 
6252   if test "x$CMP" = x; then
6253     as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6254   fi
6255 
6256 
6257 
6258 
6259 
6260   # Publish this variable in the help.
6261 
6262 
6263   if [ -z "${COMM+x}" ]; then
6264     # The variable is not set by user, try to locate tool using the code snippet
6265     for ac_prog in comm
6266 do
6267   # Extract the first word of "$ac_prog", so it can be a program name with args.
6268 set dummy $ac_prog; ac_word=$2
6269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6270 $as_echo_n "checking for $ac_word... " >&6; }
6271 if ${ac_cv_path_COMM+:} false; then :
6272   $as_echo_n "(cached) " >&6
6273 else
6274   case $COMM in
6275   [\\/]* | ?:[\\/]*)
6276   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6277   ;;
6278   *)
6279   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6280 for as_dir in $PATH
6281 do
6282   IFS=$as_save_IFS
6283   test -z "$as_dir" && as_dir=.
6284     for ac_exec_ext in '' $ac_executable_extensions; do
6285   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6286     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6287     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6288     break 2
6289   fi
6290 done
6291   done
6292 IFS=$as_save_IFS
6293 
6294   ;;
6295 esac
6296 fi
6297 COMM=$ac_cv_path_COMM
6298 if test -n "$COMM"; then
6299   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6300 $as_echo "$COMM" >&6; }
6301 else
6302   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6303 $as_echo "no" >&6; }
6304 fi
6305 
6306 
6307   test -n "$COMM" && break
6308 done
6309 
6310   else
6311     # The variable is set, but is it from the command line or the environment?
6312 
6313     # Try to remove the string !COMM! from our list.
6314     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6315     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6316       # If it failed, the variable was not from the command line. Ignore it,
6317       # but warn the user (except for BASH, which is always set by the calling BASH).
6318       if test "xCOMM" != xBASH; then
6319         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6320 $as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6321       fi
6322       # Try to locate tool using the code snippet
6323       for ac_prog in comm
6324 do
6325   # Extract the first word of "$ac_prog", so it can be a program name with args.
6326 set dummy $ac_prog; ac_word=$2
6327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6328 $as_echo_n "checking for $ac_word... " >&6; }
6329 if ${ac_cv_path_COMM+:} false; then :
6330   $as_echo_n "(cached) " >&6
6331 else
6332   case $COMM in
6333   [\\/]* | ?:[\\/]*)
6334   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6335   ;;
6336   *)
6337   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6338 for as_dir in $PATH
6339 do
6340   IFS=$as_save_IFS
6341   test -z "$as_dir" && as_dir=.
6342     for ac_exec_ext in '' $ac_executable_extensions; do
6343   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6344     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6345     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6346     break 2
6347   fi
6348 done
6349   done
6350 IFS=$as_save_IFS
6351 
6352   ;;
6353 esac
6354 fi
6355 COMM=$ac_cv_path_COMM
6356 if test -n "$COMM"; then
6357   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6358 $as_echo "$COMM" >&6; }
6359 else
6360   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6361 $as_echo "no" >&6; }
6362 fi
6363 
6364 
6365   test -n "$COMM" && break
6366 done
6367 
6368     else
6369       # If it succeeded, then it was overridden by the user. We will use it
6370       # for the tool.
6371 
6372       # First remove it from the list of overridden variables, so we can test
6373       # for unknown variables in the end.
6374       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6375 
6376       # Check if we try to supply an empty value
6377       if test "x$COMM" = x; then
6378         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6379 $as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6380         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6381 $as_echo_n "checking for COMM... " >&6; }
6382         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6383 $as_echo "disabled" >&6; }
6384       else
6385         # Check if the provided tool contains a complete path.
6386         tool_specified="$COMM"
6387         tool_basename="${tool_specified##*/}"
6388         if test "x$tool_basename" = "x$tool_specified"; then
6389           # A command without a complete path is provided, search $PATH.
6390           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6391 $as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6392           # Extract the first word of "$tool_basename", so it can be a program name with args.
6393 set dummy $tool_basename; ac_word=$2
6394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6395 $as_echo_n "checking for $ac_word... " >&6; }
6396 if ${ac_cv_path_COMM+:} false; then :
6397   $as_echo_n "(cached) " >&6
6398 else
6399   case $COMM in
6400   [\\/]* | ?:[\\/]*)
6401   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6402   ;;
6403   *)
6404   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6405 for as_dir in $PATH
6406 do
6407   IFS=$as_save_IFS
6408   test -z "$as_dir" && as_dir=.
6409     for ac_exec_ext in '' $ac_executable_extensions; do
6410   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6411     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6412     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6413     break 2
6414   fi
6415 done
6416   done
6417 IFS=$as_save_IFS
6418 
6419   ;;
6420 esac
6421 fi
6422 COMM=$ac_cv_path_COMM
6423 if test -n "$COMM"; then
6424   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6425 $as_echo "$COMM" >&6; }
6426 else
6427   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6428 $as_echo "no" >&6; }
6429 fi
6430 
6431 
6432           if test "x$COMM" = x; then
6433             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6434           fi
6435         else
6436           # Otherwise we believe it is a complete path. Use it as it is.
6437           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6438 $as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6439           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6440 $as_echo_n "checking for COMM... " >&6; }
6441           if test ! -x "$tool_specified"; then
6442             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6443 $as_echo "not found" >&6; }
6444             as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6445           fi
6446           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6447 $as_echo "$tool_specified" >&6; }
6448         fi
6449       fi
6450     fi
6451 
6452   fi
6453 
6454 
6455 
6456   if test "x$COMM" = x; then
6457     as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6458   fi
6459 
6460 
6461 
6462 
6463 
6464   # Publish this variable in the help.
6465 
6466 
6467   if [ -z "${CP+x}" ]; then
6468     # The variable is not set by user, try to locate tool using the code snippet
6469     for ac_prog in cp
6470 do
6471   # Extract the first word of "$ac_prog", so it can be a program name with args.
6472 set dummy $ac_prog; ac_word=$2
6473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6474 $as_echo_n "checking for $ac_word... " >&6; }
6475 if ${ac_cv_path_CP+:} false; then :
6476   $as_echo_n "(cached) " >&6
6477 else
6478   case $CP in
6479   [\\/]* | ?:[\\/]*)
6480   ac_cv_path_CP="$CP" # Let the user override the test with a path.
6481   ;;
6482   *)
6483   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6484 for as_dir in $PATH
6485 do
6486   IFS=$as_save_IFS
6487   test -z "$as_dir" && as_dir=.
6488     for ac_exec_ext in '' $ac_executable_extensions; do
6489   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6490     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6491     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6492     break 2
6493   fi
6494 done
6495   done
6496 IFS=$as_save_IFS
6497 
6498   ;;
6499 esac
6500 fi
6501 CP=$ac_cv_path_CP
6502 if test -n "$CP"; then
6503   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6504 $as_echo "$CP" >&6; }
6505 else
6506   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6507 $as_echo "no" >&6; }
6508 fi
6509 
6510 
6511   test -n "$CP" && break
6512 done
6513 
6514   else
6515     # The variable is set, but is it from the command line or the environment?
6516 
6517     # Try to remove the string !CP! from our list.
6518     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6519     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6520       # If it failed, the variable was not from the command line. Ignore it,
6521       # but warn the user (except for BASH, which is always set by the calling BASH).
6522       if test "xCP" != xBASH; then
6523         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6524 $as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6525       fi
6526       # Try to locate tool using the code snippet
6527       for ac_prog in cp
6528 do
6529   # Extract the first word of "$ac_prog", so it can be a program name with args.
6530 set dummy $ac_prog; ac_word=$2
6531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6532 $as_echo_n "checking for $ac_word... " >&6; }
6533 if ${ac_cv_path_CP+:} false; then :
6534   $as_echo_n "(cached) " >&6
6535 else
6536   case $CP in
6537   [\\/]* | ?:[\\/]*)
6538   ac_cv_path_CP="$CP" # Let the user override the test with a path.
6539   ;;
6540   *)
6541   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6542 for as_dir in $PATH
6543 do
6544   IFS=$as_save_IFS
6545   test -z "$as_dir" && as_dir=.
6546     for ac_exec_ext in '' $ac_executable_extensions; do
6547   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6548     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6549     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6550     break 2
6551   fi
6552 done
6553   done
6554 IFS=$as_save_IFS
6555 
6556   ;;
6557 esac
6558 fi
6559 CP=$ac_cv_path_CP
6560 if test -n "$CP"; then
6561   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6562 $as_echo "$CP" >&6; }
6563 else
6564   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6565 $as_echo "no" >&6; }
6566 fi
6567 
6568 
6569   test -n "$CP" && break
6570 done
6571 
6572     else
6573       # If it succeeded, then it was overridden by the user. We will use it
6574       # for the tool.
6575 
6576       # First remove it from the list of overridden variables, so we can test
6577       # for unknown variables in the end.
6578       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6579 
6580       # Check if we try to supply an empty value
6581       if test "x$CP" = x; then
6582         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6583 $as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6584         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6585 $as_echo_n "checking for CP... " >&6; }
6586         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6587 $as_echo "disabled" >&6; }
6588       else
6589         # Check if the provided tool contains a complete path.
6590         tool_specified="$CP"
6591         tool_basename="${tool_specified##*/}"
6592         if test "x$tool_basename" = "x$tool_specified"; then
6593           # A command without a complete path is provided, search $PATH.
6594           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6595 $as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6596           # Extract the first word of "$tool_basename", so it can be a program name with args.
6597 set dummy $tool_basename; ac_word=$2
6598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6599 $as_echo_n "checking for $ac_word... " >&6; }
6600 if ${ac_cv_path_CP+:} false; then :
6601   $as_echo_n "(cached) " >&6
6602 else
6603   case $CP in
6604   [\\/]* | ?:[\\/]*)
6605   ac_cv_path_CP="$CP" # Let the user override the test with a path.
6606   ;;
6607   *)
6608   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6609 for as_dir in $PATH
6610 do
6611   IFS=$as_save_IFS
6612   test -z "$as_dir" && as_dir=.
6613     for ac_exec_ext in '' $ac_executable_extensions; do
6614   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6615     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6616     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6617     break 2
6618   fi
6619 done
6620   done
6621 IFS=$as_save_IFS
6622 
6623   ;;
6624 esac
6625 fi
6626 CP=$ac_cv_path_CP
6627 if test -n "$CP"; then
6628   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6629 $as_echo "$CP" >&6; }
6630 else
6631   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6632 $as_echo "no" >&6; }
6633 fi
6634 
6635 
6636           if test "x$CP" = x; then
6637             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6638           fi
6639         else
6640           # Otherwise we believe it is a complete path. Use it as it is.
6641           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6642 $as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6643           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6644 $as_echo_n "checking for CP... " >&6; }
6645           if test ! -x "$tool_specified"; then
6646             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6647 $as_echo "not found" >&6; }
6648             as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6649           fi
6650           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6651 $as_echo "$tool_specified" >&6; }
6652         fi
6653       fi
6654     fi
6655 
6656   fi
6657 
6658 
6659 
6660   if test "x$CP" = x; then
6661     as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6662   fi
6663 
6664 
6665 
6666 
6667 
6668   # Publish this variable in the help.
6669 
6670 
6671   if [ -z "${CUT+x}" ]; then
6672     # The variable is not set by user, try to locate tool using the code snippet
6673     for ac_prog in cut
6674 do
6675   # Extract the first word of "$ac_prog", so it can be a program name with args.
6676 set dummy $ac_prog; ac_word=$2
6677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6678 $as_echo_n "checking for $ac_word... " >&6; }
6679 if ${ac_cv_path_CUT+:} false; then :
6680   $as_echo_n "(cached) " >&6
6681 else
6682   case $CUT in
6683   [\\/]* | ?:[\\/]*)
6684   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6685   ;;
6686   *)
6687   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6688 for as_dir in $PATH
6689 do
6690   IFS=$as_save_IFS
6691   test -z "$as_dir" && as_dir=.
6692     for ac_exec_ext in '' $ac_executable_extensions; do
6693   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6694     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6695     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6696     break 2
6697   fi
6698 done
6699   done
6700 IFS=$as_save_IFS
6701 
6702   ;;
6703 esac
6704 fi
6705 CUT=$ac_cv_path_CUT
6706 if test -n "$CUT"; then
6707   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6708 $as_echo "$CUT" >&6; }
6709 else
6710   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6711 $as_echo "no" >&6; }
6712 fi
6713 
6714 
6715   test -n "$CUT" && break
6716 done
6717 
6718   else
6719     # The variable is set, but is it from the command line or the environment?
6720 
6721     # Try to remove the string !CUT! from our list.
6722     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6723     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6724       # If it failed, the variable was not from the command line. Ignore it,
6725       # but warn the user (except for BASH, which is always set by the calling BASH).
6726       if test "xCUT" != xBASH; then
6727         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6728 $as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6729       fi
6730       # Try to locate tool using the code snippet
6731       for ac_prog in cut
6732 do
6733   # Extract the first word of "$ac_prog", so it can be a program name with args.
6734 set dummy $ac_prog; ac_word=$2
6735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6736 $as_echo_n "checking for $ac_word... " >&6; }
6737 if ${ac_cv_path_CUT+:} false; then :
6738   $as_echo_n "(cached) " >&6
6739 else
6740   case $CUT in
6741   [\\/]* | ?:[\\/]*)
6742   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6743   ;;
6744   *)
6745   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6746 for as_dir in $PATH
6747 do
6748   IFS=$as_save_IFS
6749   test -z "$as_dir" && as_dir=.
6750     for ac_exec_ext in '' $ac_executable_extensions; do
6751   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6752     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6753     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6754     break 2
6755   fi
6756 done
6757   done
6758 IFS=$as_save_IFS
6759 
6760   ;;
6761 esac
6762 fi
6763 CUT=$ac_cv_path_CUT
6764 if test -n "$CUT"; then
6765   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6766 $as_echo "$CUT" >&6; }
6767 else
6768   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6769 $as_echo "no" >&6; }
6770 fi
6771 
6772 
6773   test -n "$CUT" && break
6774 done
6775 
6776     else
6777       # If it succeeded, then it was overridden by the user. We will use it
6778       # for the tool.
6779 
6780       # First remove it from the list of overridden variables, so we can test
6781       # for unknown variables in the end.
6782       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6783 
6784       # Check if we try to supply an empty value
6785       if test "x$CUT" = x; then
6786         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6787 $as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6788         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6789 $as_echo_n "checking for CUT... " >&6; }
6790         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6791 $as_echo "disabled" >&6; }
6792       else
6793         # Check if the provided tool contains a complete path.
6794         tool_specified="$CUT"
6795         tool_basename="${tool_specified##*/}"
6796         if test "x$tool_basename" = "x$tool_specified"; then
6797           # A command without a complete path is provided, search $PATH.
6798           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6799 $as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6800           # Extract the first word of "$tool_basename", so it can be a program name with args.
6801 set dummy $tool_basename; ac_word=$2
6802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6803 $as_echo_n "checking for $ac_word... " >&6; }
6804 if ${ac_cv_path_CUT+:} false; then :
6805   $as_echo_n "(cached) " >&6
6806 else
6807   case $CUT in
6808   [\\/]* | ?:[\\/]*)
6809   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6810   ;;
6811   *)
6812   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6813 for as_dir in $PATH
6814 do
6815   IFS=$as_save_IFS
6816   test -z "$as_dir" && as_dir=.
6817     for ac_exec_ext in '' $ac_executable_extensions; do
6818   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6819     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6820     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6821     break 2
6822   fi
6823 done
6824   done
6825 IFS=$as_save_IFS
6826 
6827   ;;
6828 esac
6829 fi
6830 CUT=$ac_cv_path_CUT
6831 if test -n "$CUT"; then
6832   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6833 $as_echo "$CUT" >&6; }
6834 else
6835   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6836 $as_echo "no" >&6; }
6837 fi
6838 
6839 
6840           if test "x$CUT" = x; then
6841             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6842           fi
6843         else
6844           # Otherwise we believe it is a complete path. Use it as it is.
6845           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6846 $as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6847           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6848 $as_echo_n "checking for CUT... " >&6; }
6849           if test ! -x "$tool_specified"; then
6850             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6851 $as_echo "not found" >&6; }
6852             as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6853           fi
6854           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6855 $as_echo "$tool_specified" >&6; }
6856         fi
6857       fi
6858     fi
6859 
6860   fi
6861 
6862 
6863 
6864   if test "x$CUT" = x; then
6865     as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6866   fi
6867 
6868 
6869 
6870 
6871 
6872   # Publish this variable in the help.
6873 
6874 
6875   if [ -z "${DATE+x}" ]; then
6876     # The variable is not set by user, try to locate tool using the code snippet
6877     for ac_prog in date
6878 do
6879   # Extract the first word of "$ac_prog", so it can be a program name with args.
6880 set dummy $ac_prog; ac_word=$2
6881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6882 $as_echo_n "checking for $ac_word... " >&6; }
6883 if ${ac_cv_path_DATE+:} false; then :
6884   $as_echo_n "(cached) " >&6
6885 else
6886   case $DATE in
6887   [\\/]* | ?:[\\/]*)
6888   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6889   ;;
6890   *)
6891   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6892 for as_dir in $PATH
6893 do
6894   IFS=$as_save_IFS
6895   test -z "$as_dir" && as_dir=.
6896     for ac_exec_ext in '' $ac_executable_extensions; do
6897   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6898     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6899     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6900     break 2
6901   fi
6902 done
6903   done
6904 IFS=$as_save_IFS
6905 
6906   ;;
6907 esac
6908 fi
6909 DATE=$ac_cv_path_DATE
6910 if test -n "$DATE"; then
6911   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6912 $as_echo "$DATE" >&6; }
6913 else
6914   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6915 $as_echo "no" >&6; }
6916 fi
6917 
6918 
6919   test -n "$DATE" && break
6920 done
6921 
6922   else
6923     # The variable is set, but is it from the command line or the environment?
6924 
6925     # Try to remove the string !DATE! from our list.
6926     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6927     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6928       # If it failed, the variable was not from the command line. Ignore it,
6929       # but warn the user (except for BASH, which is always set by the calling BASH).
6930       if test "xDATE" != xBASH; then
6931         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6932 $as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6933       fi
6934       # Try to locate tool using the code snippet
6935       for ac_prog in date
6936 do
6937   # Extract the first word of "$ac_prog", so it can be a program name with args.
6938 set dummy $ac_prog; ac_word=$2
6939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6940 $as_echo_n "checking for $ac_word... " >&6; }
6941 if ${ac_cv_path_DATE+:} false; then :
6942   $as_echo_n "(cached) " >&6
6943 else
6944   case $DATE in
6945   [\\/]* | ?:[\\/]*)
6946   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6947   ;;
6948   *)
6949   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6950 for as_dir in $PATH
6951 do
6952   IFS=$as_save_IFS
6953   test -z "$as_dir" && as_dir=.
6954     for ac_exec_ext in '' $ac_executable_extensions; do
6955   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6956     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6957     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6958     break 2
6959   fi
6960 done
6961   done
6962 IFS=$as_save_IFS
6963 
6964   ;;
6965 esac
6966 fi
6967 DATE=$ac_cv_path_DATE
6968 if test -n "$DATE"; then
6969   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6970 $as_echo "$DATE" >&6; }
6971 else
6972   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6973 $as_echo "no" >&6; }
6974 fi
6975 
6976 
6977   test -n "$DATE" && break
6978 done
6979 
6980     else
6981       # If it succeeded, then it was overridden by the user. We will use it
6982       # for the tool.
6983 
6984       # First remove it from the list of overridden variables, so we can test
6985       # for unknown variables in the end.
6986       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6987 
6988       # Check if we try to supply an empty value
6989       if test "x$DATE" = x; then
6990         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6991 $as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6992         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6993 $as_echo_n "checking for DATE... " >&6; }
6994         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6995 $as_echo "disabled" >&6; }
6996       else
6997         # Check if the provided tool contains a complete path.
6998         tool_specified="$DATE"
6999         tool_basename="${tool_specified##*/}"
7000         if test "x$tool_basename" = "x$tool_specified"; then
7001           # A command without a complete path is provided, search $PATH.
7002           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
7003 $as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
7004           # Extract the first word of "$tool_basename", so it can be a program name with args.
7005 set dummy $tool_basename; ac_word=$2
7006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7007 $as_echo_n "checking for $ac_word... " >&6; }
7008 if ${ac_cv_path_DATE+:} false; then :
7009   $as_echo_n "(cached) " >&6
7010 else
7011   case $DATE in
7012   [\\/]* | ?:[\\/]*)
7013   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
7014   ;;
7015   *)
7016   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7017 for as_dir in $PATH
7018 do
7019   IFS=$as_save_IFS
7020   test -z "$as_dir" && as_dir=.
7021     for ac_exec_ext in '' $ac_executable_extensions; do
7022   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7023     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
7024     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7025     break 2
7026   fi
7027 done
7028   done
7029 IFS=$as_save_IFS
7030 
7031   ;;
7032 esac
7033 fi
7034 DATE=$ac_cv_path_DATE
7035 if test -n "$DATE"; then
7036   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
7037 $as_echo "$DATE" >&6; }
7038 else
7039   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7040 $as_echo "no" >&6; }
7041 fi
7042 
7043 
7044           if test "x$DATE" = x; then
7045             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7046           fi
7047         else
7048           # Otherwise we believe it is a complete path. Use it as it is.
7049           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
7050 $as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
7051           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
7052 $as_echo_n "checking for DATE... " >&6; }
7053           if test ! -x "$tool_specified"; then
7054             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7055 $as_echo "not found" >&6; }
7056             as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
7057           fi
7058           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7059 $as_echo "$tool_specified" >&6; }
7060         fi
7061       fi
7062     fi
7063 
7064   fi
7065 
7066 
7067 
7068   if test "x$DATE" = x; then
7069     as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
7070   fi
7071 
7072 
7073 
7074 
7075 
7076   # Publish this variable in the help.
7077 
7078 
7079   if [ -z "${DIFF+x}" ]; then
7080     # The variable is not set by user, try to locate tool using the code snippet
7081     for ac_prog in gdiff diff
7082 do
7083   # Extract the first word of "$ac_prog", so it can be a program name with args.
7084 set dummy $ac_prog; ac_word=$2
7085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7086 $as_echo_n "checking for $ac_word... " >&6; }
7087 if ${ac_cv_path_DIFF+:} false; then :
7088   $as_echo_n "(cached) " >&6
7089 else
7090   case $DIFF in
7091   [\\/]* | ?:[\\/]*)
7092   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7093   ;;
7094   *)
7095   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7096 for as_dir in $PATH
7097 do
7098   IFS=$as_save_IFS
7099   test -z "$as_dir" && as_dir=.
7100     for ac_exec_ext in '' $ac_executable_extensions; do
7101   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7102     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7103     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7104     break 2
7105   fi
7106 done
7107   done
7108 IFS=$as_save_IFS
7109 
7110   ;;
7111 esac
7112 fi
7113 DIFF=$ac_cv_path_DIFF
7114 if test -n "$DIFF"; then
7115   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7116 $as_echo "$DIFF" >&6; }
7117 else
7118   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7119 $as_echo "no" >&6; }
7120 fi
7121 
7122 
7123   test -n "$DIFF" && break
7124 done
7125 
7126   else
7127     # The variable is set, but is it from the command line or the environment?
7128 
7129     # Try to remove the string !DIFF! from our list.
7130     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7131     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7132       # If it failed, the variable was not from the command line. Ignore it,
7133       # but warn the user (except for BASH, which is always set by the calling BASH).
7134       if test "xDIFF" != xBASH; then
7135         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7136 $as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7137       fi
7138       # Try to locate tool using the code snippet
7139       for ac_prog in gdiff diff
7140 do
7141   # Extract the first word of "$ac_prog", so it can be a program name with args.
7142 set dummy $ac_prog; ac_word=$2
7143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7144 $as_echo_n "checking for $ac_word... " >&6; }
7145 if ${ac_cv_path_DIFF+:} false; then :
7146   $as_echo_n "(cached) " >&6
7147 else
7148   case $DIFF in
7149   [\\/]* | ?:[\\/]*)
7150   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7151   ;;
7152   *)
7153   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7154 for as_dir in $PATH
7155 do
7156   IFS=$as_save_IFS
7157   test -z "$as_dir" && as_dir=.
7158     for ac_exec_ext in '' $ac_executable_extensions; do
7159   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7160     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7161     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7162     break 2
7163   fi
7164 done
7165   done
7166 IFS=$as_save_IFS
7167 
7168   ;;
7169 esac
7170 fi
7171 DIFF=$ac_cv_path_DIFF
7172 if test -n "$DIFF"; then
7173   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7174 $as_echo "$DIFF" >&6; }
7175 else
7176   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7177 $as_echo "no" >&6; }
7178 fi
7179 
7180 
7181   test -n "$DIFF" && break
7182 done
7183 
7184     else
7185       # If it succeeded, then it was overridden by the user. We will use it
7186       # for the tool.
7187 
7188       # First remove it from the list of overridden variables, so we can test
7189       # for unknown variables in the end.
7190       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7191 
7192       # Check if we try to supply an empty value
7193       if test "x$DIFF" = x; then
7194         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7195 $as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7196         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7197 $as_echo_n "checking for DIFF... " >&6; }
7198         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7199 $as_echo "disabled" >&6; }
7200       else
7201         # Check if the provided tool contains a complete path.
7202         tool_specified="$DIFF"
7203         tool_basename="${tool_specified##*/}"
7204         if test "x$tool_basename" = "x$tool_specified"; then
7205           # A command without a complete path is provided, search $PATH.
7206           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7207 $as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7208           # Extract the first word of "$tool_basename", so it can be a program name with args.
7209 set dummy $tool_basename; ac_word=$2
7210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7211 $as_echo_n "checking for $ac_word... " >&6; }
7212 if ${ac_cv_path_DIFF+:} false; then :
7213   $as_echo_n "(cached) " >&6
7214 else
7215   case $DIFF in
7216   [\\/]* | ?:[\\/]*)
7217   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7218   ;;
7219   *)
7220   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7221 for as_dir in $PATH
7222 do
7223   IFS=$as_save_IFS
7224   test -z "$as_dir" && as_dir=.
7225     for ac_exec_ext in '' $ac_executable_extensions; do
7226   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7227     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7228     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7229     break 2
7230   fi
7231 done
7232   done
7233 IFS=$as_save_IFS
7234 
7235   ;;
7236 esac
7237 fi
7238 DIFF=$ac_cv_path_DIFF
7239 if test -n "$DIFF"; then
7240   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7241 $as_echo "$DIFF" >&6; }
7242 else
7243   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7244 $as_echo "no" >&6; }
7245 fi
7246 
7247 
7248           if test "x$DIFF" = x; then
7249             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7250           fi
7251         else
7252           # Otherwise we believe it is a complete path. Use it as it is.
7253           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7254 $as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7255           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7256 $as_echo_n "checking for DIFF... " >&6; }
7257           if test ! -x "$tool_specified"; then
7258             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7259 $as_echo "not found" >&6; }
7260             as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7261           fi
7262           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7263 $as_echo "$tool_specified" >&6; }
7264         fi
7265       fi
7266     fi
7267 
7268   fi
7269 
7270 
7271 
7272   if test "x$DIFF" = x; then
7273     as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7274   fi
7275 
7276 
7277 
7278 
7279 
7280   # Publish this variable in the help.
7281 
7282 
7283   if [ -z "${DIRNAME+x}" ]; then
7284     # The variable is not set by user, try to locate tool using the code snippet
7285     for ac_prog in dirname
7286 do
7287   # Extract the first word of "$ac_prog", so it can be a program name with args.
7288 set dummy $ac_prog; ac_word=$2
7289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7290 $as_echo_n "checking for $ac_word... " >&6; }
7291 if ${ac_cv_path_DIRNAME+:} false; then :
7292   $as_echo_n "(cached) " >&6
7293 else
7294   case $DIRNAME in
7295   [\\/]* | ?:[\\/]*)
7296   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7297   ;;
7298   *)
7299   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7300 for as_dir in $PATH
7301 do
7302   IFS=$as_save_IFS
7303   test -z "$as_dir" && as_dir=.
7304     for ac_exec_ext in '' $ac_executable_extensions; do
7305   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7306     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7307     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7308     break 2
7309   fi
7310 done
7311   done
7312 IFS=$as_save_IFS
7313 
7314   ;;
7315 esac
7316 fi
7317 DIRNAME=$ac_cv_path_DIRNAME
7318 if test -n "$DIRNAME"; then
7319   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7320 $as_echo "$DIRNAME" >&6; }
7321 else
7322   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7323 $as_echo "no" >&6; }
7324 fi
7325 
7326 
7327   test -n "$DIRNAME" && break
7328 done
7329 
7330   else
7331     # The variable is set, but is it from the command line or the environment?
7332 
7333     # Try to remove the string !DIRNAME! from our list.
7334     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7335     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7336       # If it failed, the variable was not from the command line. Ignore it,
7337       # but warn the user (except for BASH, which is always set by the calling BASH).
7338       if test "xDIRNAME" != xBASH; then
7339         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7340 $as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7341       fi
7342       # Try to locate tool using the code snippet
7343       for ac_prog in dirname
7344 do
7345   # Extract the first word of "$ac_prog", so it can be a program name with args.
7346 set dummy $ac_prog; ac_word=$2
7347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7348 $as_echo_n "checking for $ac_word... " >&6; }
7349 if ${ac_cv_path_DIRNAME+:} false; then :
7350   $as_echo_n "(cached) " >&6
7351 else
7352   case $DIRNAME in
7353   [\\/]* | ?:[\\/]*)
7354   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7355   ;;
7356   *)
7357   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7358 for as_dir in $PATH
7359 do
7360   IFS=$as_save_IFS
7361   test -z "$as_dir" && as_dir=.
7362     for ac_exec_ext in '' $ac_executable_extensions; do
7363   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7364     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7365     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7366     break 2
7367   fi
7368 done
7369   done
7370 IFS=$as_save_IFS
7371 
7372   ;;
7373 esac
7374 fi
7375 DIRNAME=$ac_cv_path_DIRNAME
7376 if test -n "$DIRNAME"; then
7377   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7378 $as_echo "$DIRNAME" >&6; }
7379 else
7380   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7381 $as_echo "no" >&6; }
7382 fi
7383 
7384 
7385   test -n "$DIRNAME" && break
7386 done
7387 
7388     else
7389       # If it succeeded, then it was overridden by the user. We will use it
7390       # for the tool.
7391 
7392       # First remove it from the list of overridden variables, so we can test
7393       # for unknown variables in the end.
7394       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7395 
7396       # Check if we try to supply an empty value
7397       if test "x$DIRNAME" = x; then
7398         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7399 $as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7400         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7401 $as_echo_n "checking for DIRNAME... " >&6; }
7402         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7403 $as_echo "disabled" >&6; }
7404       else
7405         # Check if the provided tool contains a complete path.
7406         tool_specified="$DIRNAME"
7407         tool_basename="${tool_specified##*/}"
7408         if test "x$tool_basename" = "x$tool_specified"; then
7409           # A command without a complete path is provided, search $PATH.
7410           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7411 $as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7412           # Extract the first word of "$tool_basename", so it can be a program name with args.
7413 set dummy $tool_basename; ac_word=$2
7414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7415 $as_echo_n "checking for $ac_word... " >&6; }
7416 if ${ac_cv_path_DIRNAME+:} false; then :
7417   $as_echo_n "(cached) " >&6
7418 else
7419   case $DIRNAME in
7420   [\\/]* | ?:[\\/]*)
7421   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7422   ;;
7423   *)
7424   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7425 for as_dir in $PATH
7426 do
7427   IFS=$as_save_IFS
7428   test -z "$as_dir" && as_dir=.
7429     for ac_exec_ext in '' $ac_executable_extensions; do
7430   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7431     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7432     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7433     break 2
7434   fi
7435 done
7436   done
7437 IFS=$as_save_IFS
7438 
7439   ;;
7440 esac
7441 fi
7442 DIRNAME=$ac_cv_path_DIRNAME
7443 if test -n "$DIRNAME"; then
7444   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7445 $as_echo "$DIRNAME" >&6; }
7446 else
7447   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7448 $as_echo "no" >&6; }
7449 fi
7450 
7451 
7452           if test "x$DIRNAME" = x; then
7453             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7454           fi
7455         else
7456           # Otherwise we believe it is a complete path. Use it as it is.
7457           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7458 $as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7459           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7460 $as_echo_n "checking for DIRNAME... " >&6; }
7461           if test ! -x "$tool_specified"; then
7462             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7463 $as_echo "not found" >&6; }
7464             as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7465           fi
7466           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7467 $as_echo "$tool_specified" >&6; }
7468         fi
7469       fi
7470     fi
7471 
7472   fi
7473 
7474 
7475 
7476   if test "x$DIRNAME" = x; then
7477     as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7478   fi
7479 
7480 
7481 
7482 
7483 
7484   # Publish this variable in the help.
7485 
7486 
7487   if [ -z "${ECHO+x}" ]; then
7488     # The variable is not set by user, try to locate tool using the code snippet
7489     for ac_prog in echo
7490 do
7491   # Extract the first word of "$ac_prog", so it can be a program name with args.
7492 set dummy $ac_prog; ac_word=$2
7493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7494 $as_echo_n "checking for $ac_word... " >&6; }
7495 if ${ac_cv_path_ECHO+:} false; then :
7496   $as_echo_n "(cached) " >&6
7497 else
7498   case $ECHO in
7499   [\\/]* | ?:[\\/]*)
7500   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7501   ;;
7502   *)
7503   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7504 for as_dir in $PATH
7505 do
7506   IFS=$as_save_IFS
7507   test -z "$as_dir" && as_dir=.
7508     for ac_exec_ext in '' $ac_executable_extensions; do
7509   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7510     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7511     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7512     break 2
7513   fi
7514 done
7515   done
7516 IFS=$as_save_IFS
7517 
7518   ;;
7519 esac
7520 fi
7521 ECHO=$ac_cv_path_ECHO
7522 if test -n "$ECHO"; then
7523   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7524 $as_echo "$ECHO" >&6; }
7525 else
7526   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7527 $as_echo "no" >&6; }
7528 fi
7529 
7530 
7531   test -n "$ECHO" && break
7532 done
7533 
7534   else
7535     # The variable is set, but is it from the command line or the environment?
7536 
7537     # Try to remove the string !ECHO! from our list.
7538     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7539     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7540       # If it failed, the variable was not from the command line. Ignore it,
7541       # but warn the user (except for BASH, which is always set by the calling BASH).
7542       if test "xECHO" != xBASH; then
7543         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7544 $as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7545       fi
7546       # Try to locate tool using the code snippet
7547       for ac_prog in echo
7548 do
7549   # Extract the first word of "$ac_prog", so it can be a program name with args.
7550 set dummy $ac_prog; ac_word=$2
7551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7552 $as_echo_n "checking for $ac_word... " >&6; }
7553 if ${ac_cv_path_ECHO+:} false; then :
7554   $as_echo_n "(cached) " >&6
7555 else
7556   case $ECHO in
7557   [\\/]* | ?:[\\/]*)
7558   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7559   ;;
7560   *)
7561   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7562 for as_dir in $PATH
7563 do
7564   IFS=$as_save_IFS
7565   test -z "$as_dir" && as_dir=.
7566     for ac_exec_ext in '' $ac_executable_extensions; do
7567   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7568     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7569     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7570     break 2
7571   fi
7572 done
7573   done
7574 IFS=$as_save_IFS
7575 
7576   ;;
7577 esac
7578 fi
7579 ECHO=$ac_cv_path_ECHO
7580 if test -n "$ECHO"; then
7581   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7582 $as_echo "$ECHO" >&6; }
7583 else
7584   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7585 $as_echo "no" >&6; }
7586 fi
7587 
7588 
7589   test -n "$ECHO" && break
7590 done
7591 
7592     else
7593       # If it succeeded, then it was overridden by the user. We will use it
7594       # for the tool.
7595 
7596       # First remove it from the list of overridden variables, so we can test
7597       # for unknown variables in the end.
7598       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7599 
7600       # Check if we try to supply an empty value
7601       if test "x$ECHO" = x; then
7602         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7603 $as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7604         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7605 $as_echo_n "checking for ECHO... " >&6; }
7606         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7607 $as_echo "disabled" >&6; }
7608       else
7609         # Check if the provided tool contains a complete path.
7610         tool_specified="$ECHO"
7611         tool_basename="${tool_specified##*/}"
7612         if test "x$tool_basename" = "x$tool_specified"; then
7613           # A command without a complete path is provided, search $PATH.
7614           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7615 $as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7616           # Extract the first word of "$tool_basename", so it can be a program name with args.
7617 set dummy $tool_basename; ac_word=$2
7618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7619 $as_echo_n "checking for $ac_word... " >&6; }
7620 if ${ac_cv_path_ECHO+:} false; then :
7621   $as_echo_n "(cached) " >&6
7622 else
7623   case $ECHO in
7624   [\\/]* | ?:[\\/]*)
7625   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7626   ;;
7627   *)
7628   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7629 for as_dir in $PATH
7630 do
7631   IFS=$as_save_IFS
7632   test -z "$as_dir" && as_dir=.
7633     for ac_exec_ext in '' $ac_executable_extensions; do
7634   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7635     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7636     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7637     break 2
7638   fi
7639 done
7640   done
7641 IFS=$as_save_IFS
7642 
7643   ;;
7644 esac
7645 fi
7646 ECHO=$ac_cv_path_ECHO
7647 if test -n "$ECHO"; then
7648   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7649 $as_echo "$ECHO" >&6; }
7650 else
7651   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7652 $as_echo "no" >&6; }
7653 fi
7654 
7655 
7656           if test "x$ECHO" = x; then
7657             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7658           fi
7659         else
7660           # Otherwise we believe it is a complete path. Use it as it is.
7661           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7662 $as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7663           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7664 $as_echo_n "checking for ECHO... " >&6; }
7665           if test ! -x "$tool_specified"; then
7666             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7667 $as_echo "not found" >&6; }
7668             as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7669           fi
7670           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7671 $as_echo "$tool_specified" >&6; }
7672         fi
7673       fi
7674     fi
7675 
7676   fi
7677 
7678 
7679 
7680   if test "x$ECHO" = x; then
7681     as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7682   fi
7683 
7684 
7685 
7686 
7687 
7688   # Publish this variable in the help.
7689 
7690 
7691   if [ -z "${EXPR+x}" ]; then
7692     # The variable is not set by user, try to locate tool using the code snippet
7693     for ac_prog in expr
7694 do
7695   # Extract the first word of "$ac_prog", so it can be a program name with args.
7696 set dummy $ac_prog; ac_word=$2
7697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7698 $as_echo_n "checking for $ac_word... " >&6; }
7699 if ${ac_cv_path_EXPR+:} false; then :
7700   $as_echo_n "(cached) " >&6
7701 else
7702   case $EXPR in
7703   [\\/]* | ?:[\\/]*)
7704   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7705   ;;
7706   *)
7707   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7708 for as_dir in $PATH
7709 do
7710   IFS=$as_save_IFS
7711   test -z "$as_dir" && as_dir=.
7712     for ac_exec_ext in '' $ac_executable_extensions; do
7713   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7714     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7715     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7716     break 2
7717   fi
7718 done
7719   done
7720 IFS=$as_save_IFS
7721 
7722   ;;
7723 esac
7724 fi
7725 EXPR=$ac_cv_path_EXPR
7726 if test -n "$EXPR"; then
7727   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7728 $as_echo "$EXPR" >&6; }
7729 else
7730   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7731 $as_echo "no" >&6; }
7732 fi
7733 
7734 
7735   test -n "$EXPR" && break
7736 done
7737 
7738   else
7739     # The variable is set, but is it from the command line or the environment?
7740 
7741     # Try to remove the string !EXPR! from our list.
7742     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7743     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7744       # If it failed, the variable was not from the command line. Ignore it,
7745       # but warn the user (except for BASH, which is always set by the calling BASH).
7746       if test "xEXPR" != xBASH; then
7747         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7748 $as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7749       fi
7750       # Try to locate tool using the code snippet
7751       for ac_prog in expr
7752 do
7753   # Extract the first word of "$ac_prog", so it can be a program name with args.
7754 set dummy $ac_prog; ac_word=$2
7755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7756 $as_echo_n "checking for $ac_word... " >&6; }
7757 if ${ac_cv_path_EXPR+:} false; then :
7758   $as_echo_n "(cached) " >&6
7759 else
7760   case $EXPR in
7761   [\\/]* | ?:[\\/]*)
7762   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7763   ;;
7764   *)
7765   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7766 for as_dir in $PATH
7767 do
7768   IFS=$as_save_IFS
7769   test -z "$as_dir" && as_dir=.
7770     for ac_exec_ext in '' $ac_executable_extensions; do
7771   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7772     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7773     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7774     break 2
7775   fi
7776 done
7777   done
7778 IFS=$as_save_IFS
7779 
7780   ;;
7781 esac
7782 fi
7783 EXPR=$ac_cv_path_EXPR
7784 if test -n "$EXPR"; then
7785   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7786 $as_echo "$EXPR" >&6; }
7787 else
7788   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7789 $as_echo "no" >&6; }
7790 fi
7791 
7792 
7793   test -n "$EXPR" && break
7794 done
7795 
7796     else
7797       # If it succeeded, then it was overridden by the user. We will use it
7798       # for the tool.
7799 
7800       # First remove it from the list of overridden variables, so we can test
7801       # for unknown variables in the end.
7802       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7803 
7804       # Check if we try to supply an empty value
7805       if test "x$EXPR" = x; then
7806         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7807 $as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7808         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7809 $as_echo_n "checking for EXPR... " >&6; }
7810         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7811 $as_echo "disabled" >&6; }
7812       else
7813         # Check if the provided tool contains a complete path.
7814         tool_specified="$EXPR"
7815         tool_basename="${tool_specified##*/}"
7816         if test "x$tool_basename" = "x$tool_specified"; then
7817           # A command without a complete path is provided, search $PATH.
7818           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7819 $as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7820           # Extract the first word of "$tool_basename", so it can be a program name with args.
7821 set dummy $tool_basename; ac_word=$2
7822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7823 $as_echo_n "checking for $ac_word... " >&6; }
7824 if ${ac_cv_path_EXPR+:} false; then :
7825   $as_echo_n "(cached) " >&6
7826 else
7827   case $EXPR in
7828   [\\/]* | ?:[\\/]*)
7829   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7830   ;;
7831   *)
7832   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7833 for as_dir in $PATH
7834 do
7835   IFS=$as_save_IFS
7836   test -z "$as_dir" && as_dir=.
7837     for ac_exec_ext in '' $ac_executable_extensions; do
7838   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7839     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7840     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7841     break 2
7842   fi
7843 done
7844   done
7845 IFS=$as_save_IFS
7846 
7847   ;;
7848 esac
7849 fi
7850 EXPR=$ac_cv_path_EXPR
7851 if test -n "$EXPR"; then
7852   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7853 $as_echo "$EXPR" >&6; }
7854 else
7855   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7856 $as_echo "no" >&6; }
7857 fi
7858 
7859 
7860           if test "x$EXPR" = x; then
7861             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7862           fi
7863         else
7864           # Otherwise we believe it is a complete path. Use it as it is.
7865           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7866 $as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7867           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7868 $as_echo_n "checking for EXPR... " >&6; }
7869           if test ! -x "$tool_specified"; then
7870             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7871 $as_echo "not found" >&6; }
7872             as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7873           fi
7874           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7875 $as_echo "$tool_specified" >&6; }
7876         fi
7877       fi
7878     fi
7879 
7880   fi
7881 
7882 
7883 
7884   if test "x$EXPR" = x; then
7885     as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7886   fi
7887 
7888 
7889 
7890 
7891 
7892   # Publish this variable in the help.
7893 
7894 
7895   if [ -z "${FILE+x}" ]; then
7896     # The variable is not set by user, try to locate tool using the code snippet
7897     for ac_prog in file
7898 do
7899   # Extract the first word of "$ac_prog", so it can be a program name with args.
7900 set dummy $ac_prog; ac_word=$2
7901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7902 $as_echo_n "checking for $ac_word... " >&6; }
7903 if ${ac_cv_path_FILE+:} false; then :
7904   $as_echo_n "(cached) " >&6
7905 else
7906   case $FILE in
7907   [\\/]* | ?:[\\/]*)
7908   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7909   ;;
7910   *)
7911   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7912 for as_dir in $PATH
7913 do
7914   IFS=$as_save_IFS
7915   test -z "$as_dir" && as_dir=.
7916     for ac_exec_ext in '' $ac_executable_extensions; do
7917   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7918     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7919     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7920     break 2
7921   fi
7922 done
7923   done
7924 IFS=$as_save_IFS
7925 
7926   ;;
7927 esac
7928 fi
7929 FILE=$ac_cv_path_FILE
7930 if test -n "$FILE"; then
7931   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7932 $as_echo "$FILE" >&6; }
7933 else
7934   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7935 $as_echo "no" >&6; }
7936 fi
7937 
7938 
7939   test -n "$FILE" && break
7940 done
7941 
7942   else
7943     # The variable is set, but is it from the command line or the environment?
7944 
7945     # Try to remove the string !FILE! from our list.
7946     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7947     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7948       # If it failed, the variable was not from the command line. Ignore it,
7949       # but warn the user (except for BASH, which is always set by the calling BASH).
7950       if test "xFILE" != xBASH; then
7951         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7952 $as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7953       fi
7954       # Try to locate tool using the code snippet
7955       for ac_prog in file
7956 do
7957   # Extract the first word of "$ac_prog", so it can be a program name with args.
7958 set dummy $ac_prog; ac_word=$2
7959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7960 $as_echo_n "checking for $ac_word... " >&6; }
7961 if ${ac_cv_path_FILE+:} false; then :
7962   $as_echo_n "(cached) " >&6
7963 else
7964   case $FILE in
7965   [\\/]* | ?:[\\/]*)
7966   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7967   ;;
7968   *)
7969   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7970 for as_dir in $PATH
7971 do
7972   IFS=$as_save_IFS
7973   test -z "$as_dir" && as_dir=.
7974     for ac_exec_ext in '' $ac_executable_extensions; do
7975   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7976     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7977     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7978     break 2
7979   fi
7980 done
7981   done
7982 IFS=$as_save_IFS
7983 
7984   ;;
7985 esac
7986 fi
7987 FILE=$ac_cv_path_FILE
7988 if test -n "$FILE"; then
7989   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7990 $as_echo "$FILE" >&6; }
7991 else
7992   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7993 $as_echo "no" >&6; }
7994 fi
7995 
7996 
7997   test -n "$FILE" && break
7998 done
7999 
8000     else
8001       # If it succeeded, then it was overridden by the user. We will use it
8002       # for the tool.
8003 
8004       # First remove it from the list of overridden variables, so we can test
8005       # for unknown variables in the end.
8006       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8007 
8008       # Check if we try to supply an empty value
8009       if test "x$FILE" = x; then
8010         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
8011 $as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
8012         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
8013 $as_echo_n "checking for FILE... " >&6; }
8014         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8015 $as_echo "disabled" >&6; }
8016       else
8017         # Check if the provided tool contains a complete path.
8018         tool_specified="$FILE"
8019         tool_basename="${tool_specified##*/}"
8020         if test "x$tool_basename" = "x$tool_specified"; then
8021           # A command without a complete path is provided, search $PATH.
8022           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
8023 $as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
8024           # Extract the first word of "$tool_basename", so it can be a program name with args.
8025 set dummy $tool_basename; ac_word=$2
8026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8027 $as_echo_n "checking for $ac_word... " >&6; }
8028 if ${ac_cv_path_FILE+:} false; then :
8029   $as_echo_n "(cached) " >&6
8030 else
8031   case $FILE in
8032   [\\/]* | ?:[\\/]*)
8033   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
8034   ;;
8035   *)
8036   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8037 for as_dir in $PATH
8038 do
8039   IFS=$as_save_IFS
8040   test -z "$as_dir" && as_dir=.
8041     for ac_exec_ext in '' $ac_executable_extensions; do
8042   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8043     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
8044     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8045     break 2
8046   fi
8047 done
8048   done
8049 IFS=$as_save_IFS
8050 
8051   ;;
8052 esac
8053 fi
8054 FILE=$ac_cv_path_FILE
8055 if test -n "$FILE"; then
8056   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
8057 $as_echo "$FILE" >&6; }
8058 else
8059   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8060 $as_echo "no" >&6; }
8061 fi
8062 
8063 
8064           if test "x$FILE" = x; then
8065             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8066           fi
8067         else
8068           # Otherwise we believe it is a complete path. Use it as it is.
8069           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
8070 $as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
8071           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
8072 $as_echo_n "checking for FILE... " >&6; }
8073           if test ! -x "$tool_specified"; then
8074             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8075 $as_echo "not found" >&6; }
8076             as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
8077           fi
8078           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8079 $as_echo "$tool_specified" >&6; }
8080         fi
8081       fi
8082     fi
8083 
8084   fi
8085 
8086 
8087 
8088   if test "x$FILE" = x; then
8089     as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
8090   fi
8091 
8092 
8093 
8094 
8095 
8096   # Publish this variable in the help.
8097 
8098 
8099   if [ -z "${FIND+x}" ]; then
8100     # The variable is not set by user, try to locate tool using the code snippet
8101     for ac_prog in find
8102 do
8103   # Extract the first word of "$ac_prog", so it can be a program name with args.
8104 set dummy $ac_prog; ac_word=$2
8105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8106 $as_echo_n "checking for $ac_word... " >&6; }
8107 if ${ac_cv_path_FIND+:} false; then :
8108   $as_echo_n "(cached) " >&6
8109 else
8110   case $FIND in
8111   [\\/]* | ?:[\\/]*)
8112   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8113   ;;
8114   *)
8115   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8116 for as_dir in $PATH
8117 do
8118   IFS=$as_save_IFS
8119   test -z "$as_dir" && as_dir=.
8120     for ac_exec_ext in '' $ac_executable_extensions; do
8121   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8122     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8123     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8124     break 2
8125   fi
8126 done
8127   done
8128 IFS=$as_save_IFS
8129 
8130   ;;
8131 esac
8132 fi
8133 FIND=$ac_cv_path_FIND
8134 if test -n "$FIND"; then
8135   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8136 $as_echo "$FIND" >&6; }
8137 else
8138   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8139 $as_echo "no" >&6; }
8140 fi
8141 
8142 
8143   test -n "$FIND" && break
8144 done
8145 
8146   else
8147     # The variable is set, but is it from the command line or the environment?
8148 
8149     # Try to remove the string !FIND! from our list.
8150     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8151     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8152       # If it failed, the variable was not from the command line. Ignore it,
8153       # but warn the user (except for BASH, which is always set by the calling BASH).
8154       if test "xFIND" != xBASH; then
8155         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8156 $as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8157       fi
8158       # Try to locate tool using the code snippet
8159       for ac_prog in find
8160 do
8161   # Extract the first word of "$ac_prog", so it can be a program name with args.
8162 set dummy $ac_prog; ac_word=$2
8163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8164 $as_echo_n "checking for $ac_word... " >&6; }
8165 if ${ac_cv_path_FIND+:} false; then :
8166   $as_echo_n "(cached) " >&6
8167 else
8168   case $FIND in
8169   [\\/]* | ?:[\\/]*)
8170   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8171   ;;
8172   *)
8173   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8174 for as_dir in $PATH
8175 do
8176   IFS=$as_save_IFS
8177   test -z "$as_dir" && as_dir=.
8178     for ac_exec_ext in '' $ac_executable_extensions; do
8179   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8180     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8181     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8182     break 2
8183   fi
8184 done
8185   done
8186 IFS=$as_save_IFS
8187 
8188   ;;
8189 esac
8190 fi
8191 FIND=$ac_cv_path_FIND
8192 if test -n "$FIND"; then
8193   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8194 $as_echo "$FIND" >&6; }
8195 else
8196   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8197 $as_echo "no" >&6; }
8198 fi
8199 
8200 
8201   test -n "$FIND" && break
8202 done
8203 
8204     else
8205       # If it succeeded, then it was overridden by the user. We will use it
8206       # for the tool.
8207 
8208       # First remove it from the list of overridden variables, so we can test
8209       # for unknown variables in the end.
8210       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8211 
8212       # Check if we try to supply an empty value
8213       if test "x$FIND" = x; then
8214         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8215 $as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8216         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8217 $as_echo_n "checking for FIND... " >&6; }
8218         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8219 $as_echo "disabled" >&6; }
8220       else
8221         # Check if the provided tool contains a complete path.
8222         tool_specified="$FIND"
8223         tool_basename="${tool_specified##*/}"
8224         if test "x$tool_basename" = "x$tool_specified"; then
8225           # A command without a complete path is provided, search $PATH.
8226           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8227 $as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8228           # Extract the first word of "$tool_basename", so it can be a program name with args.
8229 set dummy $tool_basename; ac_word=$2
8230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8231 $as_echo_n "checking for $ac_word... " >&6; }
8232 if ${ac_cv_path_FIND+:} false; then :
8233   $as_echo_n "(cached) " >&6
8234 else
8235   case $FIND in
8236   [\\/]* | ?:[\\/]*)
8237   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8238   ;;
8239   *)
8240   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8241 for as_dir in $PATH
8242 do
8243   IFS=$as_save_IFS
8244   test -z "$as_dir" && as_dir=.
8245     for ac_exec_ext in '' $ac_executable_extensions; do
8246   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8247     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8248     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8249     break 2
8250   fi
8251 done
8252   done
8253 IFS=$as_save_IFS
8254 
8255   ;;
8256 esac
8257 fi
8258 FIND=$ac_cv_path_FIND
8259 if test -n "$FIND"; then
8260   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8261 $as_echo "$FIND" >&6; }
8262 else
8263   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8264 $as_echo "no" >&6; }
8265 fi
8266 
8267 
8268           if test "x$FIND" = x; then
8269             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8270           fi
8271         else
8272           # Otherwise we believe it is a complete path. Use it as it is.
8273           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8274 $as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8275           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8276 $as_echo_n "checking for FIND... " >&6; }
8277           if test ! -x "$tool_specified"; then
8278             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8279 $as_echo "not found" >&6; }
8280             as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8281           fi
8282           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8283 $as_echo "$tool_specified" >&6; }
8284         fi
8285       fi
8286     fi
8287 
8288   fi
8289 
8290 
8291 
8292   if test "x$FIND" = x; then
8293     as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8294   fi
8295 
8296 
8297 
8298 
8299 
8300   # Publish this variable in the help.
8301 
8302 
8303   if [ -z "${HEAD+x}" ]; then
8304     # The variable is not set by user, try to locate tool using the code snippet
8305     for ac_prog in head
8306 do
8307   # Extract the first word of "$ac_prog", so it can be a program name with args.
8308 set dummy $ac_prog; ac_word=$2
8309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8310 $as_echo_n "checking for $ac_word... " >&6; }
8311 if ${ac_cv_path_HEAD+:} false; then :
8312   $as_echo_n "(cached) " >&6
8313 else
8314   case $HEAD in
8315   [\\/]* | ?:[\\/]*)
8316   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8317   ;;
8318   *)
8319   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8320 for as_dir in $PATH
8321 do
8322   IFS=$as_save_IFS
8323   test -z "$as_dir" && as_dir=.
8324     for ac_exec_ext in '' $ac_executable_extensions; do
8325   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8326     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8327     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8328     break 2
8329   fi
8330 done
8331   done
8332 IFS=$as_save_IFS
8333 
8334   ;;
8335 esac
8336 fi
8337 HEAD=$ac_cv_path_HEAD
8338 if test -n "$HEAD"; then
8339   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8340 $as_echo "$HEAD" >&6; }
8341 else
8342   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8343 $as_echo "no" >&6; }
8344 fi
8345 
8346 
8347   test -n "$HEAD" && break
8348 done
8349 
8350   else
8351     # The variable is set, but is it from the command line or the environment?
8352 
8353     # Try to remove the string !HEAD! from our list.
8354     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8355     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8356       # If it failed, the variable was not from the command line. Ignore it,
8357       # but warn the user (except for BASH, which is always set by the calling BASH).
8358       if test "xHEAD" != xBASH; then
8359         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8360 $as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8361       fi
8362       # Try to locate tool using the code snippet
8363       for ac_prog in head
8364 do
8365   # Extract the first word of "$ac_prog", so it can be a program name with args.
8366 set dummy $ac_prog; ac_word=$2
8367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8368 $as_echo_n "checking for $ac_word... " >&6; }
8369 if ${ac_cv_path_HEAD+:} false; then :
8370   $as_echo_n "(cached) " >&6
8371 else
8372   case $HEAD in
8373   [\\/]* | ?:[\\/]*)
8374   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8375   ;;
8376   *)
8377   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8378 for as_dir in $PATH
8379 do
8380   IFS=$as_save_IFS
8381   test -z "$as_dir" && as_dir=.
8382     for ac_exec_ext in '' $ac_executable_extensions; do
8383   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8384     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8385     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8386     break 2
8387   fi
8388 done
8389   done
8390 IFS=$as_save_IFS
8391 
8392   ;;
8393 esac
8394 fi
8395 HEAD=$ac_cv_path_HEAD
8396 if test -n "$HEAD"; then
8397   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8398 $as_echo "$HEAD" >&6; }
8399 else
8400   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8401 $as_echo "no" >&6; }
8402 fi
8403 
8404 
8405   test -n "$HEAD" && break
8406 done
8407 
8408     else
8409       # If it succeeded, then it was overridden by the user. We will use it
8410       # for the tool.
8411 
8412       # First remove it from the list of overridden variables, so we can test
8413       # for unknown variables in the end.
8414       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8415 
8416       # Check if we try to supply an empty value
8417       if test "x$HEAD" = x; then
8418         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8419 $as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8420         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8421 $as_echo_n "checking for HEAD... " >&6; }
8422         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8423 $as_echo "disabled" >&6; }
8424       else
8425         # Check if the provided tool contains a complete path.
8426         tool_specified="$HEAD"
8427         tool_basename="${tool_specified##*/}"
8428         if test "x$tool_basename" = "x$tool_specified"; then
8429           # A command without a complete path is provided, search $PATH.
8430           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8431 $as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8432           # Extract the first word of "$tool_basename", so it can be a program name with args.
8433 set dummy $tool_basename; ac_word=$2
8434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8435 $as_echo_n "checking for $ac_word... " >&6; }
8436 if ${ac_cv_path_HEAD+:} false; then :
8437   $as_echo_n "(cached) " >&6
8438 else
8439   case $HEAD in
8440   [\\/]* | ?:[\\/]*)
8441   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8442   ;;
8443   *)
8444   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8445 for as_dir in $PATH
8446 do
8447   IFS=$as_save_IFS
8448   test -z "$as_dir" && as_dir=.
8449     for ac_exec_ext in '' $ac_executable_extensions; do
8450   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8451     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8452     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8453     break 2
8454   fi
8455 done
8456   done
8457 IFS=$as_save_IFS
8458 
8459   ;;
8460 esac
8461 fi
8462 HEAD=$ac_cv_path_HEAD
8463 if test -n "$HEAD"; then
8464   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8465 $as_echo "$HEAD" >&6; }
8466 else
8467   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8468 $as_echo "no" >&6; }
8469 fi
8470 
8471 
8472           if test "x$HEAD" = x; then
8473             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8474           fi
8475         else
8476           # Otherwise we believe it is a complete path. Use it as it is.
8477           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8478 $as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8479           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8480 $as_echo_n "checking for HEAD... " >&6; }
8481           if test ! -x "$tool_specified"; then
8482             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8483 $as_echo "not found" >&6; }
8484             as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8485           fi
8486           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8487 $as_echo "$tool_specified" >&6; }
8488         fi
8489       fi
8490     fi
8491 
8492   fi
8493 
8494 
8495 
8496   if test "x$HEAD" = x; then
8497     as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8498   fi
8499 
8500 
8501 
8502 
8503 
8504   # Publish this variable in the help.
8505 
8506 
8507   if [ -z "${GUNZIP+x}" ]; then
8508     # The variable is not set by user, try to locate tool using the code snippet
8509     for ac_prog in gunzip
8510 do
8511   # Extract the first word of "$ac_prog", so it can be a program name with args.
8512 set dummy $ac_prog; ac_word=$2
8513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8514 $as_echo_n "checking for $ac_word... " >&6; }
8515 if ${ac_cv_path_GUNZIP+:} false; then :
8516   $as_echo_n "(cached) " >&6
8517 else
8518   case $GUNZIP in
8519   [\\/]* | ?:[\\/]*)
8520   ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8521   ;;
8522   *)
8523   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8524 for as_dir in $PATH
8525 do
8526   IFS=$as_save_IFS
8527   test -z "$as_dir" && as_dir=.
8528     for ac_exec_ext in '' $ac_executable_extensions; do
8529   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8530     ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8531     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8532     break 2
8533   fi
8534 done
8535   done
8536 IFS=$as_save_IFS
8537 
8538   ;;
8539 esac
8540 fi
8541 GUNZIP=$ac_cv_path_GUNZIP
8542 if test -n "$GUNZIP"; then
8543   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8544 $as_echo "$GUNZIP" >&6; }
8545 else
8546   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8547 $as_echo "no" >&6; }
8548 fi
8549 
8550 
8551   test -n "$GUNZIP" && break
8552 done
8553 
8554   else
8555     # The variable is set, but is it from the command line or the environment?
8556 
8557     # Try to remove the string !GUNZIP! from our list.
8558     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
8559     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8560       # If it failed, the variable was not from the command line. Ignore it,
8561       # but warn the user (except for BASH, which is always set by the calling BASH).
8562       if test "xGUNZIP" != xBASH; then
8563         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
8564 $as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
8565       fi
8566       # Try to locate tool using the code snippet
8567       for ac_prog in gunzip
8568 do
8569   # Extract the first word of "$ac_prog", so it can be a program name with args.
8570 set dummy $ac_prog; ac_word=$2
8571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8572 $as_echo_n "checking for $ac_word... " >&6; }
8573 if ${ac_cv_path_GUNZIP+:} false; then :
8574   $as_echo_n "(cached) " >&6
8575 else
8576   case $GUNZIP in
8577   [\\/]* | ?:[\\/]*)
8578   ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8579   ;;
8580   *)
8581   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8582 for as_dir in $PATH
8583 do
8584   IFS=$as_save_IFS
8585   test -z "$as_dir" && as_dir=.
8586     for ac_exec_ext in '' $ac_executable_extensions; do
8587   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8588     ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8589     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8590     break 2
8591   fi
8592 done
8593   done
8594 IFS=$as_save_IFS
8595 
8596   ;;
8597 esac
8598 fi
8599 GUNZIP=$ac_cv_path_GUNZIP
8600 if test -n "$GUNZIP"; then
8601   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8602 $as_echo "$GUNZIP" >&6; }
8603 else
8604   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8605 $as_echo "no" >&6; }
8606 fi
8607 
8608 
8609   test -n "$GUNZIP" && break
8610 done
8611 
8612     else
8613       # If it succeeded, then it was overridden by the user. We will use it
8614       # for the tool.
8615 
8616       # First remove it from the list of overridden variables, so we can test
8617       # for unknown variables in the end.
8618       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8619 
8620       # Check if we try to supply an empty value
8621       if test "x$GUNZIP" = x; then
8622         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
8623 $as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
8624         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8625 $as_echo_n "checking for GUNZIP... " >&6; }
8626         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8627 $as_echo "disabled" >&6; }
8628       else
8629         # Check if the provided tool contains a complete path.
8630         tool_specified="$GUNZIP"
8631         tool_basename="${tool_specified##*/}"
8632         if test "x$tool_basename" = "x$tool_specified"; then
8633           # A command without a complete path is provided, search $PATH.
8634           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
8635 $as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
8636           # Extract the first word of "$tool_basename", so it can be a program name with args.
8637 set dummy $tool_basename; ac_word=$2
8638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8639 $as_echo_n "checking for $ac_word... " >&6; }
8640 if ${ac_cv_path_GUNZIP+:} false; then :
8641   $as_echo_n "(cached) " >&6
8642 else
8643   case $GUNZIP in
8644   [\\/]* | ?:[\\/]*)
8645   ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8646   ;;
8647   *)
8648   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8649 for as_dir in $PATH
8650 do
8651   IFS=$as_save_IFS
8652   test -z "$as_dir" && as_dir=.
8653     for ac_exec_ext in '' $ac_executable_extensions; do
8654   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8655     ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8656     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8657     break 2
8658   fi
8659 done
8660   done
8661 IFS=$as_save_IFS
8662 
8663   ;;
8664 esac
8665 fi
8666 GUNZIP=$ac_cv_path_GUNZIP
8667 if test -n "$GUNZIP"; then
8668   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8669 $as_echo "$GUNZIP" >&6; }
8670 else
8671   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8672 $as_echo "no" >&6; }
8673 fi
8674 
8675 
8676           if test "x$GUNZIP" = x; then
8677             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8678           fi
8679         else
8680           # Otherwise we believe it is a complete path. Use it as it is.
8681           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
8682 $as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
8683           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8684 $as_echo_n "checking for GUNZIP... " >&6; }
8685           if test ! -x "$tool_specified"; then
8686             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8687 $as_echo "not found" >&6; }
8688             as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8689           fi
8690           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8691 $as_echo "$tool_specified" >&6; }
8692         fi
8693       fi
8694     fi
8695 
8696   fi
8697 
8698 
8699 
8700   if test "x$GUNZIP" = x; then
8701     as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
8702   fi
8703 
8704 
8705 
8706 
8707 
8708   # Publish this variable in the help.
8709 
8710 
8711   if [ -z "${GZIP+x}" ]; then
8712     # The variable is not set by user, try to locate tool using the code snippet
8713     for ac_prog in pigz gzip
8714 do
8715   # Extract the first word of "$ac_prog", so it can be a program name with args.
8716 set dummy $ac_prog; ac_word=$2
8717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8718 $as_echo_n "checking for $ac_word... " >&6; }
8719 if ${ac_cv_path_GZIP+:} false; then :
8720   $as_echo_n "(cached) " >&6
8721 else
8722   case $GZIP in
8723   [\\/]* | ?:[\\/]*)
8724   ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8725   ;;
8726   *)
8727   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8728 for as_dir in $PATH
8729 do
8730   IFS=$as_save_IFS
8731   test -z "$as_dir" && as_dir=.
8732     for ac_exec_ext in '' $ac_executable_extensions; do
8733   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8734     ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8735     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8736     break 2
8737   fi
8738 done
8739   done
8740 IFS=$as_save_IFS
8741 
8742   ;;
8743 esac
8744 fi
8745 GZIP=$ac_cv_path_GZIP
8746 if test -n "$GZIP"; then
8747   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8748 $as_echo "$GZIP" >&6; }
8749 else
8750   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8751 $as_echo "no" >&6; }
8752 fi
8753 
8754 
8755   test -n "$GZIP" && break
8756 done
8757 
8758   else
8759     # The variable is set, but is it from the command line or the environment?
8760 
8761     # Try to remove the string !GZIP! from our list.
8762     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
8763     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8764       # If it failed, the variable was not from the command line. Ignore it,
8765       # but warn the user (except for BASH, which is always set by the calling BASH).
8766       if test "xGZIP" != xBASH; then
8767         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
8768 $as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
8769       fi
8770       # Try to locate tool using the code snippet
8771       for ac_prog in pigz gzip
8772 do
8773   # Extract the first word of "$ac_prog", so it can be a program name with args.
8774 set dummy $ac_prog; ac_word=$2
8775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8776 $as_echo_n "checking for $ac_word... " >&6; }
8777 if ${ac_cv_path_GZIP+:} false; then :
8778   $as_echo_n "(cached) " >&6
8779 else
8780   case $GZIP in
8781   [\\/]* | ?:[\\/]*)
8782   ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8783   ;;
8784   *)
8785   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8786 for as_dir in $PATH
8787 do
8788   IFS=$as_save_IFS
8789   test -z "$as_dir" && as_dir=.
8790     for ac_exec_ext in '' $ac_executable_extensions; do
8791   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8792     ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8793     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8794     break 2
8795   fi
8796 done
8797   done
8798 IFS=$as_save_IFS
8799 
8800   ;;
8801 esac
8802 fi
8803 GZIP=$ac_cv_path_GZIP
8804 if test -n "$GZIP"; then
8805   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8806 $as_echo "$GZIP" >&6; }
8807 else
8808   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8809 $as_echo "no" >&6; }
8810 fi
8811 
8812 
8813   test -n "$GZIP" && break
8814 done
8815 
8816     else
8817       # If it succeeded, then it was overridden by the user. We will use it
8818       # for the tool.
8819 
8820       # First remove it from the list of overridden variables, so we can test
8821       # for unknown variables in the end.
8822       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8823 
8824       # Check if we try to supply an empty value
8825       if test "x$GZIP" = x; then
8826         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
8827 $as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
8828         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8829 $as_echo_n "checking for GZIP... " >&6; }
8830         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8831 $as_echo "disabled" >&6; }
8832       else
8833         # Check if the provided tool contains a complete path.
8834         tool_specified="$GZIP"
8835         tool_basename="${tool_specified##*/}"
8836         if test "x$tool_basename" = "x$tool_specified"; then
8837           # A command without a complete path is provided, search $PATH.
8838           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
8839 $as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
8840           # Extract the first word of "$tool_basename", so it can be a program name with args.
8841 set dummy $tool_basename; ac_word=$2
8842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8843 $as_echo_n "checking for $ac_word... " >&6; }
8844 if ${ac_cv_path_GZIP+:} false; then :
8845   $as_echo_n "(cached) " >&6
8846 else
8847   case $GZIP in
8848   [\\/]* | ?:[\\/]*)
8849   ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8850   ;;
8851   *)
8852   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8853 for as_dir in $PATH
8854 do
8855   IFS=$as_save_IFS
8856   test -z "$as_dir" && as_dir=.
8857     for ac_exec_ext in '' $ac_executable_extensions; do
8858   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8859     ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8860     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8861     break 2
8862   fi
8863 done
8864   done
8865 IFS=$as_save_IFS
8866 
8867   ;;
8868 esac
8869 fi
8870 GZIP=$ac_cv_path_GZIP
8871 if test -n "$GZIP"; then
8872   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8873 $as_echo "$GZIP" >&6; }
8874 else
8875   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8876 $as_echo "no" >&6; }
8877 fi
8878 
8879 
8880           if test "x$GZIP" = x; then
8881             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8882           fi
8883         else
8884           # Otherwise we believe it is a complete path. Use it as it is.
8885           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
8886 $as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
8887           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8888 $as_echo_n "checking for GZIP... " >&6; }
8889           if test ! -x "$tool_specified"; then
8890             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8891 $as_echo "not found" >&6; }
8892             as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8893           fi
8894           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8895 $as_echo "$tool_specified" >&6; }
8896         fi
8897       fi
8898     fi
8899 
8900   fi
8901 
8902 
8903 
8904   if test "x$GZIP" = x; then
8905     as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
8906   fi
8907 
8908 
8909 
8910 
8911 
8912   # Publish this variable in the help.
8913 
8914 
8915   if [ -z "${LN+x}" ]; then
8916     # The variable is not set by user, try to locate tool using the code snippet
8917     for ac_prog in ln
8918 do
8919   # Extract the first word of "$ac_prog", so it can be a program name with args.
8920 set dummy $ac_prog; ac_word=$2
8921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8922 $as_echo_n "checking for $ac_word... " >&6; }
8923 if ${ac_cv_path_LN+:} false; then :
8924   $as_echo_n "(cached) " >&6
8925 else
8926   case $LN in
8927   [\\/]* | ?:[\\/]*)
8928   ac_cv_path_LN="$LN" # Let the user override the test with a path.
8929   ;;
8930   *)
8931   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8932 for as_dir in $PATH
8933 do
8934   IFS=$as_save_IFS
8935   test -z "$as_dir" && as_dir=.
8936     for ac_exec_ext in '' $ac_executable_extensions; do
8937   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8938     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8939     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8940     break 2
8941   fi
8942 done
8943   done
8944 IFS=$as_save_IFS
8945 
8946   ;;
8947 esac
8948 fi
8949 LN=$ac_cv_path_LN
8950 if test -n "$LN"; then
8951   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8952 $as_echo "$LN" >&6; }
8953 else
8954   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8955 $as_echo "no" >&6; }
8956 fi
8957 
8958 
8959   test -n "$LN" && break
8960 done
8961 
8962   else
8963     # The variable is set, but is it from the command line or the environment?
8964 
8965     # Try to remove the string !LN! from our list.
8966     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8967     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8968       # If it failed, the variable was not from the command line. Ignore it,
8969       # but warn the user (except for BASH, which is always set by the calling BASH).
8970       if test "xLN" != xBASH; then
8971         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8972 $as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8973       fi
8974       # Try to locate tool using the code snippet
8975       for ac_prog in ln
8976 do
8977   # Extract the first word of "$ac_prog", so it can be a program name with args.
8978 set dummy $ac_prog; ac_word=$2
8979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8980 $as_echo_n "checking for $ac_word... " >&6; }
8981 if ${ac_cv_path_LN+:} false; then :
8982   $as_echo_n "(cached) " >&6
8983 else
8984   case $LN in
8985   [\\/]* | ?:[\\/]*)
8986   ac_cv_path_LN="$LN" # Let the user override the test with a path.
8987   ;;
8988   *)
8989   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8990 for as_dir in $PATH
8991 do
8992   IFS=$as_save_IFS
8993   test -z "$as_dir" && as_dir=.
8994     for ac_exec_ext in '' $ac_executable_extensions; do
8995   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8996     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8997     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8998     break 2
8999   fi
9000 done
9001   done
9002 IFS=$as_save_IFS
9003 
9004   ;;
9005 esac
9006 fi
9007 LN=$ac_cv_path_LN
9008 if test -n "$LN"; then
9009   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
9010 $as_echo "$LN" >&6; }
9011 else
9012   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9013 $as_echo "no" >&6; }
9014 fi
9015 
9016 
9017   test -n "$LN" && break
9018 done
9019 
9020     else
9021       # If it succeeded, then it was overridden by the user. We will use it
9022       # for the tool.
9023 
9024       # First remove it from the list of overridden variables, so we can test
9025       # for unknown variables in the end.
9026       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9027 
9028       # Check if we try to supply an empty value
9029       if test "x$LN" = x; then
9030         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
9031 $as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
9032         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9033 $as_echo_n "checking for LN... " >&6; }
9034         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9035 $as_echo "disabled" >&6; }
9036       else
9037         # Check if the provided tool contains a complete path.
9038         tool_specified="$LN"
9039         tool_basename="${tool_specified##*/}"
9040         if test "x$tool_basename" = "x$tool_specified"; then
9041           # A command without a complete path is provided, search $PATH.
9042           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
9043 $as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
9044           # Extract the first word of "$tool_basename", so it can be a program name with args.
9045 set dummy $tool_basename; ac_word=$2
9046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9047 $as_echo_n "checking for $ac_word... " >&6; }
9048 if ${ac_cv_path_LN+:} false; then :
9049   $as_echo_n "(cached) " >&6
9050 else
9051   case $LN in
9052   [\\/]* | ?:[\\/]*)
9053   ac_cv_path_LN="$LN" # Let the user override the test with a path.
9054   ;;
9055   *)
9056   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9057 for as_dir in $PATH
9058 do
9059   IFS=$as_save_IFS
9060   test -z "$as_dir" && as_dir=.
9061     for ac_exec_ext in '' $ac_executable_extensions; do
9062   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9063     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
9064     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9065     break 2
9066   fi
9067 done
9068   done
9069 IFS=$as_save_IFS
9070 
9071   ;;
9072 esac
9073 fi
9074 LN=$ac_cv_path_LN
9075 if test -n "$LN"; then
9076   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
9077 $as_echo "$LN" >&6; }
9078 else
9079   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9080 $as_echo "no" >&6; }
9081 fi
9082 
9083 
9084           if test "x$LN" = x; then
9085             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9086           fi
9087         else
9088           # Otherwise we believe it is a complete path. Use it as it is.
9089           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
9090 $as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
9091           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9092 $as_echo_n "checking for LN... " >&6; }
9093           if test ! -x "$tool_specified"; then
9094             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9095 $as_echo "not found" >&6; }
9096             as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
9097           fi
9098           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9099 $as_echo "$tool_specified" >&6; }
9100         fi
9101       fi
9102     fi
9103 
9104   fi
9105 
9106 
9107 
9108   if test "x$LN" = x; then
9109     as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
9110   fi
9111 
9112 
9113 
9114 
9115 
9116   # Publish this variable in the help.
9117 
9118 
9119   if [ -z "${LS+x}" ]; then
9120     # The variable is not set by user, try to locate tool using the code snippet
9121     for ac_prog in ls
9122 do
9123   # Extract the first word of "$ac_prog", so it can be a program name with args.
9124 set dummy $ac_prog; ac_word=$2
9125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9126 $as_echo_n "checking for $ac_word... " >&6; }
9127 if ${ac_cv_path_LS+:} false; then :
9128   $as_echo_n "(cached) " >&6
9129 else
9130   case $LS in
9131   [\\/]* | ?:[\\/]*)
9132   ac_cv_path_LS="$LS" # Let the user override the test with a path.
9133   ;;
9134   *)
9135   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9136 for as_dir in $PATH
9137 do
9138   IFS=$as_save_IFS
9139   test -z "$as_dir" && as_dir=.
9140     for ac_exec_ext in '' $ac_executable_extensions; do
9141   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9142     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9143     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9144     break 2
9145   fi
9146 done
9147   done
9148 IFS=$as_save_IFS
9149 
9150   ;;
9151 esac
9152 fi
9153 LS=$ac_cv_path_LS
9154 if test -n "$LS"; then
9155   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9156 $as_echo "$LS" >&6; }
9157 else
9158   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9159 $as_echo "no" >&6; }
9160 fi
9161 
9162 
9163   test -n "$LS" && break
9164 done
9165 
9166   else
9167     # The variable is set, but is it from the command line or the environment?
9168 
9169     # Try to remove the string !LS! from our list.
9170     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
9171     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9172       # If it failed, the variable was not from the command line. Ignore it,
9173       # but warn the user (except for BASH, which is always set by the calling BASH).
9174       if test "xLS" != xBASH; then
9175         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
9176 $as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
9177       fi
9178       # Try to locate tool using the code snippet
9179       for ac_prog in ls
9180 do
9181   # Extract the first word of "$ac_prog", so it can be a program name with args.
9182 set dummy $ac_prog; ac_word=$2
9183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9184 $as_echo_n "checking for $ac_word... " >&6; }
9185 if ${ac_cv_path_LS+:} false; then :
9186   $as_echo_n "(cached) " >&6
9187 else
9188   case $LS in
9189   [\\/]* | ?:[\\/]*)
9190   ac_cv_path_LS="$LS" # Let the user override the test with a path.
9191   ;;
9192   *)
9193   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9194 for as_dir in $PATH
9195 do
9196   IFS=$as_save_IFS
9197   test -z "$as_dir" && as_dir=.
9198     for ac_exec_ext in '' $ac_executable_extensions; do
9199   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9200     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9201     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9202     break 2
9203   fi
9204 done
9205   done
9206 IFS=$as_save_IFS
9207 
9208   ;;
9209 esac
9210 fi
9211 LS=$ac_cv_path_LS
9212 if test -n "$LS"; then
9213   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9214 $as_echo "$LS" >&6; }
9215 else
9216   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9217 $as_echo "no" >&6; }
9218 fi
9219 
9220 
9221   test -n "$LS" && break
9222 done
9223 
9224     else
9225       # If it succeeded, then it was overridden by the user. We will use it
9226       # for the tool.
9227 
9228       # First remove it from the list of overridden variables, so we can test
9229       # for unknown variables in the end.
9230       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9231 
9232       # Check if we try to supply an empty value
9233       if test "x$LS" = x; then
9234         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
9235 $as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
9236         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9237 $as_echo_n "checking for LS... " >&6; }
9238         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9239 $as_echo "disabled" >&6; }
9240       else
9241         # Check if the provided tool contains a complete path.
9242         tool_specified="$LS"
9243         tool_basename="${tool_specified##*/}"
9244         if test "x$tool_basename" = "x$tool_specified"; then
9245           # A command without a complete path is provided, search $PATH.
9246           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
9247 $as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
9248           # Extract the first word of "$tool_basename", so it can be a program name with args.
9249 set dummy $tool_basename; ac_word=$2
9250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9251 $as_echo_n "checking for $ac_word... " >&6; }
9252 if ${ac_cv_path_LS+:} false; then :
9253   $as_echo_n "(cached) " >&6
9254 else
9255   case $LS in
9256   [\\/]* | ?:[\\/]*)
9257   ac_cv_path_LS="$LS" # Let the user override the test with a path.
9258   ;;
9259   *)
9260   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9261 for as_dir in $PATH
9262 do
9263   IFS=$as_save_IFS
9264   test -z "$as_dir" && as_dir=.
9265     for ac_exec_ext in '' $ac_executable_extensions; do
9266   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9267     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9268     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9269     break 2
9270   fi
9271 done
9272   done
9273 IFS=$as_save_IFS
9274 
9275   ;;
9276 esac
9277 fi
9278 LS=$ac_cv_path_LS
9279 if test -n "$LS"; then
9280   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9281 $as_echo "$LS" >&6; }
9282 else
9283   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9284 $as_echo "no" >&6; }
9285 fi
9286 
9287 
9288           if test "x$LS" = x; then
9289             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9290           fi
9291         else
9292           # Otherwise we believe it is a complete path. Use it as it is.
9293           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
9294 $as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
9295           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9296 $as_echo_n "checking for LS... " >&6; }
9297           if test ! -x "$tool_specified"; then
9298             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9299 $as_echo "not found" >&6; }
9300             as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
9301           fi
9302           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9303 $as_echo "$tool_specified" >&6; }
9304         fi
9305       fi
9306     fi
9307 
9308   fi
9309 
9310 
9311 
9312   if test "x$LS" = x; then
9313     as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
9314   fi
9315 
9316 
9317 
9318 
9319 
9320   # Publish this variable in the help.
9321 
9322 
9323   if [ -z "${MKDIR+x}" ]; then
9324     # The variable is not set by user, try to locate tool using the code snippet
9325     for ac_prog in mkdir
9326 do
9327   # Extract the first word of "$ac_prog", so it can be a program name with args.
9328 set dummy $ac_prog; ac_word=$2
9329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9330 $as_echo_n "checking for $ac_word... " >&6; }
9331 if ${ac_cv_path_MKDIR+:} false; then :
9332   $as_echo_n "(cached) " >&6
9333 else
9334   case $MKDIR in
9335   [\\/]* | ?:[\\/]*)
9336   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9337   ;;
9338   *)
9339   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9340 for as_dir in $PATH
9341 do
9342   IFS=$as_save_IFS
9343   test -z "$as_dir" && as_dir=.
9344     for ac_exec_ext in '' $ac_executable_extensions; do
9345   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9346     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9347     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9348     break 2
9349   fi
9350 done
9351   done
9352 IFS=$as_save_IFS
9353 
9354   ;;
9355 esac
9356 fi
9357 MKDIR=$ac_cv_path_MKDIR
9358 if test -n "$MKDIR"; then
9359   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9360 $as_echo "$MKDIR" >&6; }
9361 else
9362   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9363 $as_echo "no" >&6; }
9364 fi
9365 
9366 
9367   test -n "$MKDIR" && break
9368 done
9369 
9370   else
9371     # The variable is set, but is it from the command line or the environment?
9372 
9373     # Try to remove the string !MKDIR! from our list.
9374     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
9375     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9376       # If it failed, the variable was not from the command line. Ignore it,
9377       # but warn the user (except for BASH, which is always set by the calling BASH).
9378       if test "xMKDIR" != xBASH; then
9379         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
9380 $as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
9381       fi
9382       # Try to locate tool using the code snippet
9383       for ac_prog in mkdir
9384 do
9385   # Extract the first word of "$ac_prog", so it can be a program name with args.
9386 set dummy $ac_prog; ac_word=$2
9387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9388 $as_echo_n "checking for $ac_word... " >&6; }
9389 if ${ac_cv_path_MKDIR+:} false; then :
9390   $as_echo_n "(cached) " >&6
9391 else
9392   case $MKDIR in
9393   [\\/]* | ?:[\\/]*)
9394   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9395   ;;
9396   *)
9397   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9398 for as_dir in $PATH
9399 do
9400   IFS=$as_save_IFS
9401   test -z "$as_dir" && as_dir=.
9402     for ac_exec_ext in '' $ac_executable_extensions; do
9403   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9404     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9405     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9406     break 2
9407   fi
9408 done
9409   done
9410 IFS=$as_save_IFS
9411 
9412   ;;
9413 esac
9414 fi
9415 MKDIR=$ac_cv_path_MKDIR
9416 if test -n "$MKDIR"; then
9417   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9418 $as_echo "$MKDIR" >&6; }
9419 else
9420   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9421 $as_echo "no" >&6; }
9422 fi
9423 
9424 
9425   test -n "$MKDIR" && break
9426 done
9427 
9428     else
9429       # If it succeeded, then it was overridden by the user. We will use it
9430       # for the tool.
9431 
9432       # First remove it from the list of overridden variables, so we can test
9433       # for unknown variables in the end.
9434       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9435 
9436       # Check if we try to supply an empty value
9437       if test "x$MKDIR" = x; then
9438         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
9439 $as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
9440         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9441 $as_echo_n "checking for MKDIR... " >&6; }
9442         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9443 $as_echo "disabled" >&6; }
9444       else
9445         # Check if the provided tool contains a complete path.
9446         tool_specified="$MKDIR"
9447         tool_basename="${tool_specified##*/}"
9448         if test "x$tool_basename" = "x$tool_specified"; then
9449           # A command without a complete path is provided, search $PATH.
9450           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
9451 $as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
9452           # Extract the first word of "$tool_basename", so it can be a program name with args.
9453 set dummy $tool_basename; ac_word=$2
9454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9455 $as_echo_n "checking for $ac_word... " >&6; }
9456 if ${ac_cv_path_MKDIR+:} false; then :
9457   $as_echo_n "(cached) " >&6
9458 else
9459   case $MKDIR in
9460   [\\/]* | ?:[\\/]*)
9461   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9462   ;;
9463   *)
9464   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9465 for as_dir in $PATH
9466 do
9467   IFS=$as_save_IFS
9468   test -z "$as_dir" && as_dir=.
9469     for ac_exec_ext in '' $ac_executable_extensions; do
9470   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9471     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9472     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9473     break 2
9474   fi
9475 done
9476   done
9477 IFS=$as_save_IFS
9478 
9479   ;;
9480 esac
9481 fi
9482 MKDIR=$ac_cv_path_MKDIR
9483 if test -n "$MKDIR"; then
9484   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9485 $as_echo "$MKDIR" >&6; }
9486 else
9487   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9488 $as_echo "no" >&6; }
9489 fi
9490 
9491 
9492           if test "x$MKDIR" = x; then
9493             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9494           fi
9495         else
9496           # Otherwise we believe it is a complete path. Use it as it is.
9497           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
9498 $as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
9499           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9500 $as_echo_n "checking for MKDIR... " >&6; }
9501           if test ! -x "$tool_specified"; then
9502             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9503 $as_echo "not found" >&6; }
9504             as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9505           fi
9506           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9507 $as_echo "$tool_specified" >&6; }
9508         fi
9509       fi
9510     fi
9511 
9512   fi
9513 
9514 
9515 
9516   if test "x$MKDIR" = x; then
9517     as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9518   fi
9519 
9520 
9521 
9522 
9523 
9524   # Publish this variable in the help.
9525 
9526 
9527   if [ -z "${MKTEMP+x}" ]; then
9528     # The variable is not set by user, try to locate tool using the code snippet
9529     for ac_prog in mktemp
9530 do
9531   # Extract the first word of "$ac_prog", so it can be a program name with args.
9532 set dummy $ac_prog; ac_word=$2
9533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9534 $as_echo_n "checking for $ac_word... " >&6; }
9535 if ${ac_cv_path_MKTEMP+:} false; then :
9536   $as_echo_n "(cached) " >&6
9537 else
9538   case $MKTEMP in
9539   [\\/]* | ?:[\\/]*)
9540   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9541   ;;
9542   *)
9543   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9544 for as_dir in $PATH
9545 do
9546   IFS=$as_save_IFS
9547   test -z "$as_dir" && as_dir=.
9548     for ac_exec_ext in '' $ac_executable_extensions; do
9549   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9550     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9551     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9552     break 2
9553   fi
9554 done
9555   done
9556 IFS=$as_save_IFS
9557 
9558   ;;
9559 esac
9560 fi
9561 MKTEMP=$ac_cv_path_MKTEMP
9562 if test -n "$MKTEMP"; then
9563   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9564 $as_echo "$MKTEMP" >&6; }
9565 else
9566   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9567 $as_echo "no" >&6; }
9568 fi
9569 
9570 
9571   test -n "$MKTEMP" && break
9572 done
9573 
9574   else
9575     # The variable is set, but is it from the command line or the environment?
9576 
9577     # Try to remove the string !MKTEMP! from our list.
9578     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9579     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9580       # If it failed, the variable was not from the command line. Ignore it,
9581       # but warn the user (except for BASH, which is always set by the calling BASH).
9582       if test "xMKTEMP" != xBASH; then
9583         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9584 $as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9585       fi
9586       # Try to locate tool using the code snippet
9587       for ac_prog in mktemp
9588 do
9589   # Extract the first word of "$ac_prog", so it can be a program name with args.
9590 set dummy $ac_prog; ac_word=$2
9591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9592 $as_echo_n "checking for $ac_word... " >&6; }
9593 if ${ac_cv_path_MKTEMP+:} false; then :
9594   $as_echo_n "(cached) " >&6
9595 else
9596   case $MKTEMP in
9597   [\\/]* | ?:[\\/]*)
9598   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9599   ;;
9600   *)
9601   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9602 for as_dir in $PATH
9603 do
9604   IFS=$as_save_IFS
9605   test -z "$as_dir" && as_dir=.
9606     for ac_exec_ext in '' $ac_executable_extensions; do
9607   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9608     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9609     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9610     break 2
9611   fi
9612 done
9613   done
9614 IFS=$as_save_IFS
9615 
9616   ;;
9617 esac
9618 fi
9619 MKTEMP=$ac_cv_path_MKTEMP
9620 if test -n "$MKTEMP"; then
9621   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9622 $as_echo "$MKTEMP" >&6; }
9623 else
9624   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9625 $as_echo "no" >&6; }
9626 fi
9627 
9628 
9629   test -n "$MKTEMP" && break
9630 done
9631 
9632     else
9633       # If it succeeded, then it was overridden by the user. We will use it
9634       # for the tool.
9635 
9636       # First remove it from the list of overridden variables, so we can test
9637       # for unknown variables in the end.
9638       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9639 
9640       # Check if we try to supply an empty value
9641       if test "x$MKTEMP" = x; then
9642         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9643 $as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9644         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9645 $as_echo_n "checking for MKTEMP... " >&6; }
9646         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9647 $as_echo "disabled" >&6; }
9648       else
9649         # Check if the provided tool contains a complete path.
9650         tool_specified="$MKTEMP"
9651         tool_basename="${tool_specified##*/}"
9652         if test "x$tool_basename" = "x$tool_specified"; then
9653           # A command without a complete path is provided, search $PATH.
9654           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9655 $as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9656           # Extract the first word of "$tool_basename", so it can be a program name with args.
9657 set dummy $tool_basename; ac_word=$2
9658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9659 $as_echo_n "checking for $ac_word... " >&6; }
9660 if ${ac_cv_path_MKTEMP+:} false; then :
9661   $as_echo_n "(cached) " >&6
9662 else
9663   case $MKTEMP in
9664   [\\/]* | ?:[\\/]*)
9665   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9666   ;;
9667   *)
9668   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9669 for as_dir in $PATH
9670 do
9671   IFS=$as_save_IFS
9672   test -z "$as_dir" && as_dir=.
9673     for ac_exec_ext in '' $ac_executable_extensions; do
9674   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9675     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9676     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9677     break 2
9678   fi
9679 done
9680   done
9681 IFS=$as_save_IFS
9682 
9683   ;;
9684 esac
9685 fi
9686 MKTEMP=$ac_cv_path_MKTEMP
9687 if test -n "$MKTEMP"; then
9688   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9689 $as_echo "$MKTEMP" >&6; }
9690 else
9691   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9692 $as_echo "no" >&6; }
9693 fi
9694 
9695 
9696           if test "x$MKTEMP" = x; then
9697             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9698           fi
9699         else
9700           # Otherwise we believe it is a complete path. Use it as it is.
9701           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9702 $as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9703           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9704 $as_echo_n "checking for MKTEMP... " >&6; }
9705           if test ! -x "$tool_specified"; then
9706             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9707 $as_echo "not found" >&6; }
9708             as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9709           fi
9710           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9711 $as_echo "$tool_specified" >&6; }
9712         fi
9713       fi
9714     fi
9715 
9716   fi
9717 
9718 
9719 
9720   if test "x$MKTEMP" = x; then
9721     as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9722   fi
9723 
9724 
9725 
9726 
9727 
9728   # Publish this variable in the help.
9729 
9730 
9731   if [ -z "${MV+x}" ]; then
9732     # The variable is not set by user, try to locate tool using the code snippet
9733     for ac_prog in mv
9734 do
9735   # Extract the first word of "$ac_prog", so it can be a program name with args.
9736 set dummy $ac_prog; ac_word=$2
9737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9738 $as_echo_n "checking for $ac_word... " >&6; }
9739 if ${ac_cv_path_MV+:} false; then :
9740   $as_echo_n "(cached) " >&6
9741 else
9742   case $MV in
9743   [\\/]* | ?:[\\/]*)
9744   ac_cv_path_MV="$MV" # Let the user override the test with a path.
9745   ;;
9746   *)
9747   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9748 for as_dir in $PATH
9749 do
9750   IFS=$as_save_IFS
9751   test -z "$as_dir" && as_dir=.
9752     for ac_exec_ext in '' $ac_executable_extensions; do
9753   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9754     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9755     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9756     break 2
9757   fi
9758 done
9759   done
9760 IFS=$as_save_IFS
9761 
9762   ;;
9763 esac
9764 fi
9765 MV=$ac_cv_path_MV
9766 if test -n "$MV"; then
9767   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9768 $as_echo "$MV" >&6; }
9769 else
9770   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9771 $as_echo "no" >&6; }
9772 fi
9773 
9774 
9775   test -n "$MV" && break
9776 done
9777 
9778   else
9779     # The variable is set, but is it from the command line or the environment?
9780 
9781     # Try to remove the string !MV! from our list.
9782     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9783     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9784       # If it failed, the variable was not from the command line. Ignore it,
9785       # but warn the user (except for BASH, which is always set by the calling BASH).
9786       if test "xMV" != xBASH; then
9787         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9788 $as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9789       fi
9790       # Try to locate tool using the code snippet
9791       for ac_prog in mv
9792 do
9793   # Extract the first word of "$ac_prog", so it can be a program name with args.
9794 set dummy $ac_prog; ac_word=$2
9795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9796 $as_echo_n "checking for $ac_word... " >&6; }
9797 if ${ac_cv_path_MV+:} false; then :
9798   $as_echo_n "(cached) " >&6
9799 else
9800   case $MV in
9801   [\\/]* | ?:[\\/]*)
9802   ac_cv_path_MV="$MV" # Let the user override the test with a path.
9803   ;;
9804   *)
9805   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9806 for as_dir in $PATH
9807 do
9808   IFS=$as_save_IFS
9809   test -z "$as_dir" && as_dir=.
9810     for ac_exec_ext in '' $ac_executable_extensions; do
9811   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9812     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9813     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9814     break 2
9815   fi
9816 done
9817   done
9818 IFS=$as_save_IFS
9819 
9820   ;;
9821 esac
9822 fi
9823 MV=$ac_cv_path_MV
9824 if test -n "$MV"; then
9825   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9826 $as_echo "$MV" >&6; }
9827 else
9828   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9829 $as_echo "no" >&6; }
9830 fi
9831 
9832 
9833   test -n "$MV" && break
9834 done
9835 
9836     else
9837       # If it succeeded, then it was overridden by the user. We will use it
9838       # for the tool.
9839 
9840       # First remove it from the list of overridden variables, so we can test
9841       # for unknown variables in the end.
9842       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9843 
9844       # Check if we try to supply an empty value
9845       if test "x$MV" = x; then
9846         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9847 $as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9848         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9849 $as_echo_n "checking for MV... " >&6; }
9850         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9851 $as_echo "disabled" >&6; }
9852       else
9853         # Check if the provided tool contains a complete path.
9854         tool_specified="$MV"
9855         tool_basename="${tool_specified##*/}"
9856         if test "x$tool_basename" = "x$tool_specified"; then
9857           # A command without a complete path is provided, search $PATH.
9858           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9859 $as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9860           # Extract the first word of "$tool_basename", so it can be a program name with args.
9861 set dummy $tool_basename; ac_word=$2
9862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9863 $as_echo_n "checking for $ac_word... " >&6; }
9864 if ${ac_cv_path_MV+:} false; then :
9865   $as_echo_n "(cached) " >&6
9866 else
9867   case $MV in
9868   [\\/]* | ?:[\\/]*)
9869   ac_cv_path_MV="$MV" # Let the user override the test with a path.
9870   ;;
9871   *)
9872   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9873 for as_dir in $PATH
9874 do
9875   IFS=$as_save_IFS
9876   test -z "$as_dir" && as_dir=.
9877     for ac_exec_ext in '' $ac_executable_extensions; do
9878   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9879     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9880     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9881     break 2
9882   fi
9883 done
9884   done
9885 IFS=$as_save_IFS
9886 
9887   ;;
9888 esac
9889 fi
9890 MV=$ac_cv_path_MV
9891 if test -n "$MV"; then
9892   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9893 $as_echo "$MV" >&6; }
9894 else
9895   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9896 $as_echo "no" >&6; }
9897 fi
9898 
9899 
9900           if test "x$MV" = x; then
9901             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9902           fi
9903         else
9904           # Otherwise we believe it is a complete path. Use it as it is.
9905           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9906 $as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9907           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9908 $as_echo_n "checking for MV... " >&6; }
9909           if test ! -x "$tool_specified"; then
9910             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9911 $as_echo "not found" >&6; }
9912             as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9913           fi
9914           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9915 $as_echo "$tool_specified" >&6; }
9916         fi
9917       fi
9918     fi
9919 
9920   fi
9921 
9922 
9923 
9924   if test "x$MV" = x; then
9925     as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9926   fi
9927 
9928 
9929 
9930 
9931 
9932   # Publish this variable in the help.
9933 
9934 
9935   if [ -z "${NAWK+x}" ]; then
9936     # The variable is not set by user, try to locate tool using the code snippet
9937     for ac_prog in nawk gawk awk
9938 do
9939   # Extract the first word of "$ac_prog", so it can be a program name with args.
9940 set dummy $ac_prog; ac_word=$2
9941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9942 $as_echo_n "checking for $ac_word... " >&6; }
9943 if ${ac_cv_path_NAWK+:} false; then :
9944   $as_echo_n "(cached) " >&6
9945 else
9946   case $NAWK in
9947   [\\/]* | ?:[\\/]*)
9948   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9949   ;;
9950   *)
9951   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9952 for as_dir in $PATH
9953 do
9954   IFS=$as_save_IFS
9955   test -z "$as_dir" && as_dir=.
9956     for ac_exec_ext in '' $ac_executable_extensions; do
9957   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9958     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9959     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9960     break 2
9961   fi
9962 done
9963   done
9964 IFS=$as_save_IFS
9965 
9966   ;;
9967 esac
9968 fi
9969 NAWK=$ac_cv_path_NAWK
9970 if test -n "$NAWK"; then
9971   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9972 $as_echo "$NAWK" >&6; }
9973 else
9974   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9975 $as_echo "no" >&6; }
9976 fi
9977 
9978 
9979   test -n "$NAWK" && break
9980 done
9981 
9982   else
9983     # The variable is set, but is it from the command line or the environment?
9984 
9985     # Try to remove the string !NAWK! from our list.
9986     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9987     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9988       # If it failed, the variable was not from the command line. Ignore it,
9989       # but warn the user (except for BASH, which is always set by the calling BASH).
9990       if test "xNAWK" != xBASH; then
9991         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9992 $as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9993       fi
9994       # Try to locate tool using the code snippet
9995       for ac_prog in nawk gawk awk
9996 do
9997   # Extract the first word of "$ac_prog", so it can be a program name with args.
9998 set dummy $ac_prog; ac_word=$2
9999 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10000 $as_echo_n "checking for $ac_word... " >&6; }
10001 if ${ac_cv_path_NAWK+:} false; then :
10002   $as_echo_n "(cached) " >&6
10003 else
10004   case $NAWK in
10005   [\\/]* | ?:[\\/]*)
10006   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
10007   ;;
10008   *)
10009   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10010 for as_dir in $PATH
10011 do
10012   IFS=$as_save_IFS
10013   test -z "$as_dir" && as_dir=.
10014     for ac_exec_ext in '' $ac_executable_extensions; do
10015   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10016     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10017     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10018     break 2
10019   fi
10020 done
10021   done
10022 IFS=$as_save_IFS
10023 
10024   ;;
10025 esac
10026 fi
10027 NAWK=$ac_cv_path_NAWK
10028 if test -n "$NAWK"; then
10029   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10030 $as_echo "$NAWK" >&6; }
10031 else
10032   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10033 $as_echo "no" >&6; }
10034 fi
10035 
10036 
10037   test -n "$NAWK" && break
10038 done
10039 
10040     else
10041       # If it succeeded, then it was overridden by the user. We will use it
10042       # for the tool.
10043 
10044       # First remove it from the list of overridden variables, so we can test
10045       # for unknown variables in the end.
10046       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10047 
10048       # Check if we try to supply an empty value
10049       if test "x$NAWK" = x; then
10050         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
10051 $as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
10052         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10053 $as_echo_n "checking for NAWK... " >&6; }
10054         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10055 $as_echo "disabled" >&6; }
10056       else
10057         # Check if the provided tool contains a complete path.
10058         tool_specified="$NAWK"
10059         tool_basename="${tool_specified##*/}"
10060         if test "x$tool_basename" = "x$tool_specified"; then
10061           # A command without a complete path is provided, search $PATH.
10062           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
10063 $as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
10064           # Extract the first word of "$tool_basename", so it can be a program name with args.
10065 set dummy $tool_basename; ac_word=$2
10066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10067 $as_echo_n "checking for $ac_word... " >&6; }
10068 if ${ac_cv_path_NAWK+:} false; then :
10069   $as_echo_n "(cached) " >&6
10070 else
10071   case $NAWK in
10072   [\\/]* | ?:[\\/]*)
10073   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
10074   ;;
10075   *)
10076   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10077 for as_dir in $PATH
10078 do
10079   IFS=$as_save_IFS
10080   test -z "$as_dir" && as_dir=.
10081     for ac_exec_ext in '' $ac_executable_extensions; do
10082   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10083     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10084     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10085     break 2
10086   fi
10087 done
10088   done
10089 IFS=$as_save_IFS
10090 
10091   ;;
10092 esac
10093 fi
10094 NAWK=$ac_cv_path_NAWK
10095 if test -n "$NAWK"; then
10096   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10097 $as_echo "$NAWK" >&6; }
10098 else
10099   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10100 $as_echo "no" >&6; }
10101 fi
10102 
10103 
10104           if test "x$NAWK" = x; then
10105             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10106           fi
10107         else
10108           # Otherwise we believe it is a complete path. Use it as it is.
10109           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
10110 $as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
10111           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10112 $as_echo_n "checking for NAWK... " >&6; }
10113           if test ! -x "$tool_specified"; then
10114             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10115 $as_echo "not found" >&6; }
10116             as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
10117           fi
10118           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10119 $as_echo "$tool_specified" >&6; }
10120         fi
10121       fi
10122     fi
10123 
10124   fi
10125 
10126 
10127 
10128   if test "x$NAWK" = x; then
10129     as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
10130   fi
10131 
10132 
10133 
10134 
10135 
10136   # Publish this variable in the help.
10137 
10138 
10139   if [ -z "${PRINTF+x}" ]; then
10140     # The variable is not set by user, try to locate tool using the code snippet
10141     for ac_prog in printf
10142 do
10143   # Extract the first word of "$ac_prog", so it can be a program name with args.
10144 set dummy $ac_prog; ac_word=$2
10145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10146 $as_echo_n "checking for $ac_word... " >&6; }
10147 if ${ac_cv_path_PRINTF+:} false; then :
10148   $as_echo_n "(cached) " >&6
10149 else
10150   case $PRINTF in
10151   [\\/]* | ?:[\\/]*)
10152   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10153   ;;
10154   *)
10155   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10156 for as_dir in $PATH
10157 do
10158   IFS=$as_save_IFS
10159   test -z "$as_dir" && as_dir=.
10160     for ac_exec_ext in '' $ac_executable_extensions; do
10161   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10162     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10163     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10164     break 2
10165   fi
10166 done
10167   done
10168 IFS=$as_save_IFS
10169 
10170   ;;
10171 esac
10172 fi
10173 PRINTF=$ac_cv_path_PRINTF
10174 if test -n "$PRINTF"; then
10175   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10176 $as_echo "$PRINTF" >&6; }
10177 else
10178   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10179 $as_echo "no" >&6; }
10180 fi
10181 
10182 
10183   test -n "$PRINTF" && break
10184 done
10185 
10186   else
10187     # The variable is set, but is it from the command line or the environment?
10188 
10189     # Try to remove the string !PRINTF! from our list.
10190     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
10191     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10192       # If it failed, the variable was not from the command line. Ignore it,
10193       # but warn the user (except for BASH, which is always set by the calling BASH).
10194       if test "xPRINTF" != xBASH; then
10195         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
10196 $as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
10197       fi
10198       # Try to locate tool using the code snippet
10199       for ac_prog in printf
10200 do
10201   # Extract the first word of "$ac_prog", so it can be a program name with args.
10202 set dummy $ac_prog; ac_word=$2
10203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10204 $as_echo_n "checking for $ac_word... " >&6; }
10205 if ${ac_cv_path_PRINTF+:} false; then :
10206   $as_echo_n "(cached) " >&6
10207 else
10208   case $PRINTF in
10209   [\\/]* | ?:[\\/]*)
10210   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10211   ;;
10212   *)
10213   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10214 for as_dir in $PATH
10215 do
10216   IFS=$as_save_IFS
10217   test -z "$as_dir" && as_dir=.
10218     for ac_exec_ext in '' $ac_executable_extensions; do
10219   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10220     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10221     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10222     break 2
10223   fi
10224 done
10225   done
10226 IFS=$as_save_IFS
10227 
10228   ;;
10229 esac
10230 fi
10231 PRINTF=$ac_cv_path_PRINTF
10232 if test -n "$PRINTF"; then
10233   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10234 $as_echo "$PRINTF" >&6; }
10235 else
10236   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10237 $as_echo "no" >&6; }
10238 fi
10239 
10240 
10241   test -n "$PRINTF" && break
10242 done
10243 
10244     else
10245       # If it succeeded, then it was overridden by the user. We will use it
10246       # for the tool.
10247 
10248       # First remove it from the list of overridden variables, so we can test
10249       # for unknown variables in the end.
10250       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10251 
10252       # Check if we try to supply an empty value
10253       if test "x$PRINTF" = x; then
10254         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
10255 $as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
10256         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10257 $as_echo_n "checking for PRINTF... " >&6; }
10258         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10259 $as_echo "disabled" >&6; }
10260       else
10261         # Check if the provided tool contains a complete path.
10262         tool_specified="$PRINTF"
10263         tool_basename="${tool_specified##*/}"
10264         if test "x$tool_basename" = "x$tool_specified"; then
10265           # A command without a complete path is provided, search $PATH.
10266           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
10267 $as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
10268           # Extract the first word of "$tool_basename", so it can be a program name with args.
10269 set dummy $tool_basename; ac_word=$2
10270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10271 $as_echo_n "checking for $ac_word... " >&6; }
10272 if ${ac_cv_path_PRINTF+:} false; then :
10273   $as_echo_n "(cached) " >&6
10274 else
10275   case $PRINTF in
10276   [\\/]* | ?:[\\/]*)
10277   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10278   ;;
10279   *)
10280   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10281 for as_dir in $PATH
10282 do
10283   IFS=$as_save_IFS
10284   test -z "$as_dir" && as_dir=.
10285     for ac_exec_ext in '' $ac_executable_extensions; do
10286   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10287     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10288     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10289     break 2
10290   fi
10291 done
10292   done
10293 IFS=$as_save_IFS
10294 
10295   ;;
10296 esac
10297 fi
10298 PRINTF=$ac_cv_path_PRINTF
10299 if test -n "$PRINTF"; then
10300   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10301 $as_echo "$PRINTF" >&6; }
10302 else
10303   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10304 $as_echo "no" >&6; }
10305 fi
10306 
10307 
10308           if test "x$PRINTF" = x; then
10309             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10310           fi
10311         else
10312           # Otherwise we believe it is a complete path. Use it as it is.
10313           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
10314 $as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
10315           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10316 $as_echo_n "checking for PRINTF... " >&6; }
10317           if test ! -x "$tool_specified"; then
10318             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10319 $as_echo "not found" >&6; }
10320             as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
10321           fi
10322           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10323 $as_echo "$tool_specified" >&6; }
10324         fi
10325       fi
10326     fi
10327 
10328   fi
10329 
10330 
10331 
10332   if test "x$PRINTF" = x; then
10333     as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
10334   fi
10335 
10336 
10337 
10338 
10339 
10340   # Publish this variable in the help.
10341 
10342 
10343   if [ -z "${RM+x}" ]; then
10344     # The variable is not set by user, try to locate tool using the code snippet
10345     for ac_prog in rm
10346 do
10347   # Extract the first word of "$ac_prog", so it can be a program name with args.
10348 set dummy $ac_prog; ac_word=$2
10349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10350 $as_echo_n "checking for $ac_word... " >&6; }
10351 if ${ac_cv_path_RM+:} false; then :
10352   $as_echo_n "(cached) " >&6
10353 else
10354   case $RM in
10355   [\\/]* | ?:[\\/]*)
10356   ac_cv_path_RM="$RM" # Let the user override the test with a path.
10357   ;;
10358   *)
10359   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10360 for as_dir in $PATH
10361 do
10362   IFS=$as_save_IFS
10363   test -z "$as_dir" && as_dir=.
10364     for ac_exec_ext in '' $ac_executable_extensions; do
10365   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10366     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10367     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10368     break 2
10369   fi
10370 done
10371   done
10372 IFS=$as_save_IFS
10373 
10374   ;;
10375 esac
10376 fi
10377 RM=$ac_cv_path_RM
10378 if test -n "$RM"; then
10379   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10380 $as_echo "$RM" >&6; }
10381 else
10382   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10383 $as_echo "no" >&6; }
10384 fi
10385 
10386 
10387   test -n "$RM" && break
10388 done
10389 
10390   else
10391     # The variable is set, but is it from the command line or the environment?
10392 
10393     # Try to remove the string !RM! from our list.
10394     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
10395     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10396       # If it failed, the variable was not from the command line. Ignore it,
10397       # but warn the user (except for BASH, which is always set by the calling BASH).
10398       if test "xRM" != xBASH; then
10399         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
10400 $as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
10401       fi
10402       # Try to locate tool using the code snippet
10403       for ac_prog in rm
10404 do
10405   # Extract the first word of "$ac_prog", so it can be a program name with args.
10406 set dummy $ac_prog; ac_word=$2
10407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10408 $as_echo_n "checking for $ac_word... " >&6; }
10409 if ${ac_cv_path_RM+:} false; then :
10410   $as_echo_n "(cached) " >&6
10411 else
10412   case $RM in
10413   [\\/]* | ?:[\\/]*)
10414   ac_cv_path_RM="$RM" # Let the user override the test with a path.
10415   ;;
10416   *)
10417   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10418 for as_dir in $PATH
10419 do
10420   IFS=$as_save_IFS
10421   test -z "$as_dir" && as_dir=.
10422     for ac_exec_ext in '' $ac_executable_extensions; do
10423   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10424     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10425     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10426     break 2
10427   fi
10428 done
10429   done
10430 IFS=$as_save_IFS
10431 
10432   ;;
10433 esac
10434 fi
10435 RM=$ac_cv_path_RM
10436 if test -n "$RM"; then
10437   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10438 $as_echo "$RM" >&6; }
10439 else
10440   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10441 $as_echo "no" >&6; }
10442 fi
10443 
10444 
10445   test -n "$RM" && break
10446 done
10447 
10448     else
10449       # If it succeeded, then it was overridden by the user. We will use it
10450       # for the tool.
10451 
10452       # First remove it from the list of overridden variables, so we can test
10453       # for unknown variables in the end.
10454       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10455 
10456       # Check if we try to supply an empty value
10457       if test "x$RM" = x; then
10458         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
10459 $as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
10460         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10461 $as_echo_n "checking for RM... " >&6; }
10462         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10463 $as_echo "disabled" >&6; }
10464       else
10465         # Check if the provided tool contains a complete path.
10466         tool_specified="$RM"
10467         tool_basename="${tool_specified##*/}"
10468         if test "x$tool_basename" = "x$tool_specified"; then
10469           # A command without a complete path is provided, search $PATH.
10470           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
10471 $as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
10472           # Extract the first word of "$tool_basename", so it can be a program name with args.
10473 set dummy $tool_basename; ac_word=$2
10474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10475 $as_echo_n "checking for $ac_word... " >&6; }
10476 if ${ac_cv_path_RM+:} false; then :
10477   $as_echo_n "(cached) " >&6
10478 else
10479   case $RM in
10480   [\\/]* | ?:[\\/]*)
10481   ac_cv_path_RM="$RM" # Let the user override the test with a path.
10482   ;;
10483   *)
10484   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10485 for as_dir in $PATH
10486 do
10487   IFS=$as_save_IFS
10488   test -z "$as_dir" && as_dir=.
10489     for ac_exec_ext in '' $ac_executable_extensions; do
10490   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10491     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10492     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10493     break 2
10494   fi
10495 done
10496   done
10497 IFS=$as_save_IFS
10498 
10499   ;;
10500 esac
10501 fi
10502 RM=$ac_cv_path_RM
10503 if test -n "$RM"; then
10504   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10505 $as_echo "$RM" >&6; }
10506 else
10507   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10508 $as_echo "no" >&6; }
10509 fi
10510 
10511 
10512           if test "x$RM" = x; then
10513             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10514           fi
10515         else
10516           # Otherwise we believe it is a complete path. Use it as it is.
10517           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10518 $as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10519           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10520 $as_echo_n "checking for RM... " >&6; }
10521           if test ! -x "$tool_specified"; then
10522             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10523 $as_echo "not found" >&6; }
10524             as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10525           fi
10526           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10527 $as_echo "$tool_specified" >&6; }
10528         fi
10529       fi
10530     fi
10531 
10532   fi
10533 
10534 
10535 
10536   if test "x$RM" = x; then
10537     as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10538   fi
10539 
10540 
10541 
10542 
10543 
10544   # Publish this variable in the help.
10545 
10546 
10547   if [ -z "${RMDIR+x}" ]; then
10548     # The variable is not set by user, try to locate tool using the code snippet
10549     for ac_prog in rmdir
10550 do
10551   # Extract the first word of "$ac_prog", so it can be a program name with args.
10552 set dummy $ac_prog; ac_word=$2
10553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10554 $as_echo_n "checking for $ac_word... " >&6; }
10555 if ${ac_cv_path_RMDIR+:} false; then :
10556   $as_echo_n "(cached) " >&6
10557 else
10558   case $RMDIR in
10559   [\\/]* | ?:[\\/]*)
10560   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10561   ;;
10562   *)
10563   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10564 for as_dir in $PATH
10565 do
10566   IFS=$as_save_IFS
10567   test -z "$as_dir" && as_dir=.
10568     for ac_exec_ext in '' $ac_executable_extensions; do
10569   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10570     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10571     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10572     break 2
10573   fi
10574 done
10575   done
10576 IFS=$as_save_IFS
10577 
10578   ;;
10579 esac
10580 fi
10581 RMDIR=$ac_cv_path_RMDIR
10582 if test -n "$RMDIR"; then
10583   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10584 $as_echo "$RMDIR" >&6; }
10585 else
10586   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10587 $as_echo "no" >&6; }
10588 fi
10589 
10590 
10591   test -n "$RMDIR" && break
10592 done
10593 
10594   else
10595     # The variable is set, but is it from the command line or the environment?
10596 
10597     # Try to remove the string !RMDIR! from our list.
10598     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10599     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10600       # If it failed, the variable was not from the command line. Ignore it,
10601       # but warn the user (except for BASH, which is always set by the calling BASH).
10602       if test "xRMDIR" != xBASH; then
10603         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10604 $as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10605       fi
10606       # Try to locate tool using the code snippet
10607       for ac_prog in rmdir
10608 do
10609   # Extract the first word of "$ac_prog", so it can be a program name with args.
10610 set dummy $ac_prog; ac_word=$2
10611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10612 $as_echo_n "checking for $ac_word... " >&6; }
10613 if ${ac_cv_path_RMDIR+:} false; then :
10614   $as_echo_n "(cached) " >&6
10615 else
10616   case $RMDIR in
10617   [\\/]* | ?:[\\/]*)
10618   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10619   ;;
10620   *)
10621   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10622 for as_dir in $PATH
10623 do
10624   IFS=$as_save_IFS
10625   test -z "$as_dir" && as_dir=.
10626     for ac_exec_ext in '' $ac_executable_extensions; do
10627   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10628     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10629     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10630     break 2
10631   fi
10632 done
10633   done
10634 IFS=$as_save_IFS
10635 
10636   ;;
10637 esac
10638 fi
10639 RMDIR=$ac_cv_path_RMDIR
10640 if test -n "$RMDIR"; then
10641   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10642 $as_echo "$RMDIR" >&6; }
10643 else
10644   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10645 $as_echo "no" >&6; }
10646 fi
10647 
10648 
10649   test -n "$RMDIR" && break
10650 done
10651 
10652     else
10653       # If it succeeded, then it was overridden by the user. We will use it
10654       # for the tool.
10655 
10656       # First remove it from the list of overridden variables, so we can test
10657       # for unknown variables in the end.
10658       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10659 
10660       # Check if we try to supply an empty value
10661       if test "x$RMDIR" = x; then
10662         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10663 $as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10664         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10665 $as_echo_n "checking for RMDIR... " >&6; }
10666         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10667 $as_echo "disabled" >&6; }
10668       else
10669         # Check if the provided tool contains a complete path.
10670         tool_specified="$RMDIR"
10671         tool_basename="${tool_specified##*/}"
10672         if test "x$tool_basename" = "x$tool_specified"; then
10673           # A command without a complete path is provided, search $PATH.
10674           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10675 $as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10676           # Extract the first word of "$tool_basename", so it can be a program name with args.
10677 set dummy $tool_basename; ac_word=$2
10678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10679 $as_echo_n "checking for $ac_word... " >&6; }
10680 if ${ac_cv_path_RMDIR+:} false; then :
10681   $as_echo_n "(cached) " >&6
10682 else
10683   case $RMDIR in
10684   [\\/]* | ?:[\\/]*)
10685   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10686   ;;
10687   *)
10688   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10689 for as_dir in $PATH
10690 do
10691   IFS=$as_save_IFS
10692   test -z "$as_dir" && as_dir=.
10693     for ac_exec_ext in '' $ac_executable_extensions; do
10694   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10695     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10696     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10697     break 2
10698   fi
10699 done
10700   done
10701 IFS=$as_save_IFS
10702 
10703   ;;
10704 esac
10705 fi
10706 RMDIR=$ac_cv_path_RMDIR
10707 if test -n "$RMDIR"; then
10708   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10709 $as_echo "$RMDIR" >&6; }
10710 else
10711   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10712 $as_echo "no" >&6; }
10713 fi
10714 
10715 
10716           if test "x$RMDIR" = x; then
10717             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10718           fi
10719         else
10720           # Otherwise we believe it is a complete path. Use it as it is.
10721           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10722 $as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10723           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10724 $as_echo_n "checking for RMDIR... " >&6; }
10725           if test ! -x "$tool_specified"; then
10726             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10727 $as_echo "not found" >&6; }
10728             as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10729           fi
10730           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10731 $as_echo "$tool_specified" >&6; }
10732         fi
10733       fi
10734     fi
10735 
10736   fi
10737 
10738 
10739 
10740   if test "x$RMDIR" = x; then
10741     as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10742   fi
10743 
10744 
10745 
10746 
10747 
10748   # Publish this variable in the help.
10749 
10750 
10751   if [ -z "${SH+x}" ]; then
10752     # The variable is not set by user, try to locate tool using the code snippet
10753     for ac_prog in sh
10754 do
10755   # Extract the first word of "$ac_prog", so it can be a program name with args.
10756 set dummy $ac_prog; ac_word=$2
10757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10758 $as_echo_n "checking for $ac_word... " >&6; }
10759 if ${ac_cv_path_SH+:} false; then :
10760   $as_echo_n "(cached) " >&6
10761 else
10762   case $SH in
10763   [\\/]* | ?:[\\/]*)
10764   ac_cv_path_SH="$SH" # Let the user override the test with a path.
10765   ;;
10766   *)
10767   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10768 for as_dir in $PATH
10769 do
10770   IFS=$as_save_IFS
10771   test -z "$as_dir" && as_dir=.
10772     for ac_exec_ext in '' $ac_executable_extensions; do
10773   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10774     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10775     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10776     break 2
10777   fi
10778 done
10779   done
10780 IFS=$as_save_IFS
10781 
10782   ;;
10783 esac
10784 fi
10785 SH=$ac_cv_path_SH
10786 if test -n "$SH"; then
10787   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10788 $as_echo "$SH" >&6; }
10789 else
10790   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10791 $as_echo "no" >&6; }
10792 fi
10793 
10794 
10795   test -n "$SH" && break
10796 done
10797 
10798   else
10799     # The variable is set, but is it from the command line or the environment?
10800 
10801     # Try to remove the string !SH! from our list.
10802     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10803     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10804       # If it failed, the variable was not from the command line. Ignore it,
10805       # but warn the user (except for BASH, which is always set by the calling BASH).
10806       if test "xSH" != xBASH; then
10807         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10808 $as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10809       fi
10810       # Try to locate tool using the code snippet
10811       for ac_prog in sh
10812 do
10813   # Extract the first word of "$ac_prog", so it can be a program name with args.
10814 set dummy $ac_prog; ac_word=$2
10815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10816 $as_echo_n "checking for $ac_word... " >&6; }
10817 if ${ac_cv_path_SH+:} false; then :
10818   $as_echo_n "(cached) " >&6
10819 else
10820   case $SH in
10821   [\\/]* | ?:[\\/]*)
10822   ac_cv_path_SH="$SH" # Let the user override the test with a path.
10823   ;;
10824   *)
10825   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10826 for as_dir in $PATH
10827 do
10828   IFS=$as_save_IFS
10829   test -z "$as_dir" && as_dir=.
10830     for ac_exec_ext in '' $ac_executable_extensions; do
10831   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10832     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10833     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10834     break 2
10835   fi
10836 done
10837   done
10838 IFS=$as_save_IFS
10839 
10840   ;;
10841 esac
10842 fi
10843 SH=$ac_cv_path_SH
10844 if test -n "$SH"; then
10845   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10846 $as_echo "$SH" >&6; }
10847 else
10848   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10849 $as_echo "no" >&6; }
10850 fi
10851 
10852 
10853   test -n "$SH" && break
10854 done
10855 
10856     else
10857       # If it succeeded, then it was overridden by the user. We will use it
10858       # for the tool.
10859 
10860       # First remove it from the list of overridden variables, so we can test
10861       # for unknown variables in the end.
10862       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10863 
10864       # Check if we try to supply an empty value
10865       if test "x$SH" = x; then
10866         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10867 $as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10868         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10869 $as_echo_n "checking for SH... " >&6; }
10870         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10871 $as_echo "disabled" >&6; }
10872       else
10873         # Check if the provided tool contains a complete path.
10874         tool_specified="$SH"
10875         tool_basename="${tool_specified##*/}"
10876         if test "x$tool_basename" = "x$tool_specified"; then
10877           # A command without a complete path is provided, search $PATH.
10878           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10879 $as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10880           # Extract the first word of "$tool_basename", so it can be a program name with args.
10881 set dummy $tool_basename; ac_word=$2
10882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10883 $as_echo_n "checking for $ac_word... " >&6; }
10884 if ${ac_cv_path_SH+:} false; then :
10885   $as_echo_n "(cached) " >&6
10886 else
10887   case $SH in
10888   [\\/]* | ?:[\\/]*)
10889   ac_cv_path_SH="$SH" # Let the user override the test with a path.
10890   ;;
10891   *)
10892   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10893 for as_dir in $PATH
10894 do
10895   IFS=$as_save_IFS
10896   test -z "$as_dir" && as_dir=.
10897     for ac_exec_ext in '' $ac_executable_extensions; do
10898   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10899     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10900     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10901     break 2
10902   fi
10903 done
10904   done
10905 IFS=$as_save_IFS
10906 
10907   ;;
10908 esac
10909 fi
10910 SH=$ac_cv_path_SH
10911 if test -n "$SH"; then
10912   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10913 $as_echo "$SH" >&6; }
10914 else
10915   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10916 $as_echo "no" >&6; }
10917 fi
10918 
10919 
10920           if test "x$SH" = x; then
10921             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10922           fi
10923         else
10924           # Otherwise we believe it is a complete path. Use it as it is.
10925           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10926 $as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10927           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10928 $as_echo_n "checking for SH... " >&6; }
10929           if test ! -x "$tool_specified"; then
10930             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10931 $as_echo "not found" >&6; }
10932             as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10933           fi
10934           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10935 $as_echo "$tool_specified" >&6; }
10936         fi
10937       fi
10938     fi
10939 
10940   fi
10941 
10942 
10943 
10944   if test "x$SH" = x; then
10945     as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10946   fi
10947 
10948 
10949 
10950 
10951 
10952   # Publish this variable in the help.
10953 
10954 
10955   if [ -z "${SORT+x}" ]; then
10956     # The variable is not set by user, try to locate tool using the code snippet
10957     for ac_prog in sort
10958 do
10959   # Extract the first word of "$ac_prog", so it can be a program name with args.
10960 set dummy $ac_prog; ac_word=$2
10961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10962 $as_echo_n "checking for $ac_word... " >&6; }
10963 if ${ac_cv_path_SORT+:} false; then :
10964   $as_echo_n "(cached) " >&6
10965 else
10966   case $SORT in
10967   [\\/]* | ?:[\\/]*)
10968   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10969   ;;
10970   *)
10971   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10972 for as_dir in $PATH
10973 do
10974   IFS=$as_save_IFS
10975   test -z "$as_dir" && as_dir=.
10976     for ac_exec_ext in '' $ac_executable_extensions; do
10977   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10978     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10979     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10980     break 2
10981   fi
10982 done
10983   done
10984 IFS=$as_save_IFS
10985 
10986   ;;
10987 esac
10988 fi
10989 SORT=$ac_cv_path_SORT
10990 if test -n "$SORT"; then
10991   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10992 $as_echo "$SORT" >&6; }
10993 else
10994   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10995 $as_echo "no" >&6; }
10996 fi
10997 
10998 
10999   test -n "$SORT" && break
11000 done
11001 
11002   else
11003     # The variable is set, but is it from the command line or the environment?
11004 
11005     # Try to remove the string !SORT! from our list.
11006     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
11007     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11008       # If it failed, the variable was not from the command line. Ignore it,
11009       # but warn the user (except for BASH, which is always set by the calling BASH).
11010       if test "xSORT" != xBASH; then
11011         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
11012 $as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
11013       fi
11014       # Try to locate tool using the code snippet
11015       for ac_prog in sort
11016 do
11017   # Extract the first word of "$ac_prog", so it can be a program name with args.
11018 set dummy $ac_prog; ac_word=$2
11019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11020 $as_echo_n "checking for $ac_word... " >&6; }
11021 if ${ac_cv_path_SORT+:} false; then :
11022   $as_echo_n "(cached) " >&6
11023 else
11024   case $SORT in
11025   [\\/]* | ?:[\\/]*)
11026   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11027   ;;
11028   *)
11029   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11030 for as_dir in $PATH
11031 do
11032   IFS=$as_save_IFS
11033   test -z "$as_dir" && as_dir=.
11034     for ac_exec_ext in '' $ac_executable_extensions; do
11035   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11036     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11037     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11038     break 2
11039   fi
11040 done
11041   done
11042 IFS=$as_save_IFS
11043 
11044   ;;
11045 esac
11046 fi
11047 SORT=$ac_cv_path_SORT
11048 if test -n "$SORT"; then
11049   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11050 $as_echo "$SORT" >&6; }
11051 else
11052   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11053 $as_echo "no" >&6; }
11054 fi
11055 
11056 
11057   test -n "$SORT" && break
11058 done
11059 
11060     else
11061       # If it succeeded, then it was overridden by the user. We will use it
11062       # for the tool.
11063 
11064       # First remove it from the list of overridden variables, so we can test
11065       # for unknown variables in the end.
11066       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11067 
11068       # Check if we try to supply an empty value
11069       if test "x$SORT" = x; then
11070         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
11071 $as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
11072         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11073 $as_echo_n "checking for SORT... " >&6; }
11074         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11075 $as_echo "disabled" >&6; }
11076       else
11077         # Check if the provided tool contains a complete path.
11078         tool_specified="$SORT"
11079         tool_basename="${tool_specified##*/}"
11080         if test "x$tool_basename" = "x$tool_specified"; then
11081           # A command without a complete path is provided, search $PATH.
11082           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
11083 $as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
11084           # Extract the first word of "$tool_basename", so it can be a program name with args.
11085 set dummy $tool_basename; ac_word=$2
11086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11087 $as_echo_n "checking for $ac_word... " >&6; }
11088 if ${ac_cv_path_SORT+:} false; then :
11089   $as_echo_n "(cached) " >&6
11090 else
11091   case $SORT in
11092   [\\/]* | ?:[\\/]*)
11093   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11094   ;;
11095   *)
11096   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11097 for as_dir in $PATH
11098 do
11099   IFS=$as_save_IFS
11100   test -z "$as_dir" && as_dir=.
11101     for ac_exec_ext in '' $ac_executable_extensions; do
11102   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11103     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11104     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11105     break 2
11106   fi
11107 done
11108   done
11109 IFS=$as_save_IFS
11110 
11111   ;;
11112 esac
11113 fi
11114 SORT=$ac_cv_path_SORT
11115 if test -n "$SORT"; then
11116   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11117 $as_echo "$SORT" >&6; }
11118 else
11119   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11120 $as_echo "no" >&6; }
11121 fi
11122 
11123 
11124           if test "x$SORT" = x; then
11125             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11126           fi
11127         else
11128           # Otherwise we believe it is a complete path. Use it as it is.
11129           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
11130 $as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
11131           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11132 $as_echo_n "checking for SORT... " >&6; }
11133           if test ! -x "$tool_specified"; then
11134             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11135 $as_echo "not found" >&6; }
11136             as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
11137           fi
11138           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11139 $as_echo "$tool_specified" >&6; }
11140         fi
11141       fi
11142     fi
11143 
11144   fi
11145 
11146 
11147 
11148   if test "x$SORT" = x; then
11149     as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
11150   fi
11151 
11152 
11153 
11154 
11155 
11156   # Publish this variable in the help.
11157 
11158 
11159   if [ -z "${TAIL+x}" ]; then
11160     # The variable is not set by user, try to locate tool using the code snippet
11161     for ac_prog in tail
11162 do
11163   # Extract the first word of "$ac_prog", so it can be a program name with args.
11164 set dummy $ac_prog; ac_word=$2
11165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11166 $as_echo_n "checking for $ac_word... " >&6; }
11167 if ${ac_cv_path_TAIL+:} false; then :
11168   $as_echo_n "(cached) " >&6
11169 else
11170   case $TAIL in
11171   [\\/]* | ?:[\\/]*)
11172   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11173   ;;
11174   *)
11175   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11176 for as_dir in $PATH
11177 do
11178   IFS=$as_save_IFS
11179   test -z "$as_dir" && as_dir=.
11180     for ac_exec_ext in '' $ac_executable_extensions; do
11181   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11182     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11183     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11184     break 2
11185   fi
11186 done
11187   done
11188 IFS=$as_save_IFS
11189 
11190   ;;
11191 esac
11192 fi
11193 TAIL=$ac_cv_path_TAIL
11194 if test -n "$TAIL"; then
11195   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11196 $as_echo "$TAIL" >&6; }
11197 else
11198   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11199 $as_echo "no" >&6; }
11200 fi
11201 
11202 
11203   test -n "$TAIL" && break
11204 done
11205 
11206   else
11207     # The variable is set, but is it from the command line or the environment?
11208 
11209     # Try to remove the string !TAIL! from our list.
11210     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
11211     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11212       # If it failed, the variable was not from the command line. Ignore it,
11213       # but warn the user (except for BASH, which is always set by the calling BASH).
11214       if test "xTAIL" != xBASH; then
11215         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
11216 $as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
11217       fi
11218       # Try to locate tool using the code snippet
11219       for ac_prog in tail
11220 do
11221   # Extract the first word of "$ac_prog", so it can be a program name with args.
11222 set dummy $ac_prog; ac_word=$2
11223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11224 $as_echo_n "checking for $ac_word... " >&6; }
11225 if ${ac_cv_path_TAIL+:} false; then :
11226   $as_echo_n "(cached) " >&6
11227 else
11228   case $TAIL in
11229   [\\/]* | ?:[\\/]*)
11230   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11231   ;;
11232   *)
11233   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11234 for as_dir in $PATH
11235 do
11236   IFS=$as_save_IFS
11237   test -z "$as_dir" && as_dir=.
11238     for ac_exec_ext in '' $ac_executable_extensions; do
11239   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11240     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11241     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11242     break 2
11243   fi
11244 done
11245   done
11246 IFS=$as_save_IFS
11247 
11248   ;;
11249 esac
11250 fi
11251 TAIL=$ac_cv_path_TAIL
11252 if test -n "$TAIL"; then
11253   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11254 $as_echo "$TAIL" >&6; }
11255 else
11256   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11257 $as_echo "no" >&6; }
11258 fi
11259 
11260 
11261   test -n "$TAIL" && break
11262 done
11263 
11264     else
11265       # If it succeeded, then it was overridden by the user. We will use it
11266       # for the tool.
11267 
11268       # First remove it from the list of overridden variables, so we can test
11269       # for unknown variables in the end.
11270       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11271 
11272       # Check if we try to supply an empty value
11273       if test "x$TAIL" = x; then
11274         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
11275 $as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
11276         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11277 $as_echo_n "checking for TAIL... " >&6; }
11278         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11279 $as_echo "disabled" >&6; }
11280       else
11281         # Check if the provided tool contains a complete path.
11282         tool_specified="$TAIL"
11283         tool_basename="${tool_specified##*/}"
11284         if test "x$tool_basename" = "x$tool_specified"; then
11285           # A command without a complete path is provided, search $PATH.
11286           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
11287 $as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
11288           # Extract the first word of "$tool_basename", so it can be a program name with args.
11289 set dummy $tool_basename; ac_word=$2
11290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11291 $as_echo_n "checking for $ac_word... " >&6; }
11292 if ${ac_cv_path_TAIL+:} false; then :
11293   $as_echo_n "(cached) " >&6
11294 else
11295   case $TAIL in
11296   [\\/]* | ?:[\\/]*)
11297   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11298   ;;
11299   *)
11300   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11301 for as_dir in $PATH
11302 do
11303   IFS=$as_save_IFS
11304   test -z "$as_dir" && as_dir=.
11305     for ac_exec_ext in '' $ac_executable_extensions; do
11306   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11307     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11308     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11309     break 2
11310   fi
11311 done
11312   done
11313 IFS=$as_save_IFS
11314 
11315   ;;
11316 esac
11317 fi
11318 TAIL=$ac_cv_path_TAIL
11319 if test -n "$TAIL"; then
11320   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11321 $as_echo "$TAIL" >&6; }
11322 else
11323   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11324 $as_echo "no" >&6; }
11325 fi
11326 
11327 
11328           if test "x$TAIL" = x; then
11329             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11330           fi
11331         else
11332           # Otherwise we believe it is a complete path. Use it as it is.
11333           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
11334 $as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
11335           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11336 $as_echo_n "checking for TAIL... " >&6; }
11337           if test ! -x "$tool_specified"; then
11338             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11339 $as_echo "not found" >&6; }
11340             as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
11341           fi
11342           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11343 $as_echo "$tool_specified" >&6; }
11344         fi
11345       fi
11346     fi
11347 
11348   fi
11349 
11350 
11351 
11352   if test "x$TAIL" = x; then
11353     as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
11354   fi
11355 
11356 
11357 
11358 
11359 
11360   # Publish this variable in the help.
11361 
11362 
11363   if [ -z "${TAR+x}" ]; then
11364     # The variable is not set by user, try to locate tool using the code snippet
11365     for ac_prog in gtar tar
11366 do
11367   # Extract the first word of "$ac_prog", so it can be a program name with args.
11368 set dummy $ac_prog; ac_word=$2
11369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11370 $as_echo_n "checking for $ac_word... " >&6; }
11371 if ${ac_cv_path_TAR+:} false; then :
11372   $as_echo_n "(cached) " >&6
11373 else
11374   case $TAR in
11375   [\\/]* | ?:[\\/]*)
11376   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11377   ;;
11378   *)
11379   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11380 for as_dir in $PATH
11381 do
11382   IFS=$as_save_IFS
11383   test -z "$as_dir" && as_dir=.
11384     for ac_exec_ext in '' $ac_executable_extensions; do
11385   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11386     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11387     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11388     break 2
11389   fi
11390 done
11391   done
11392 IFS=$as_save_IFS
11393 
11394   ;;
11395 esac
11396 fi
11397 TAR=$ac_cv_path_TAR
11398 if test -n "$TAR"; then
11399   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11400 $as_echo "$TAR" >&6; }
11401 else
11402   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11403 $as_echo "no" >&6; }
11404 fi
11405 
11406 
11407   test -n "$TAR" && break
11408 done
11409 
11410   else
11411     # The variable is set, but is it from the command line or the environment?
11412 
11413     # Try to remove the string !TAR! from our list.
11414     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
11415     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11416       # If it failed, the variable was not from the command line. Ignore it,
11417       # but warn the user (except for BASH, which is always set by the calling BASH).
11418       if test "xTAR" != xBASH; then
11419         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
11420 $as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
11421       fi
11422       # Try to locate tool using the code snippet
11423       for ac_prog in gtar tar
11424 do
11425   # Extract the first word of "$ac_prog", so it can be a program name with args.
11426 set dummy $ac_prog; ac_word=$2
11427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11428 $as_echo_n "checking for $ac_word... " >&6; }
11429 if ${ac_cv_path_TAR+:} false; then :
11430   $as_echo_n "(cached) " >&6
11431 else
11432   case $TAR in
11433   [\\/]* | ?:[\\/]*)
11434   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11435   ;;
11436   *)
11437   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11438 for as_dir in $PATH
11439 do
11440   IFS=$as_save_IFS
11441   test -z "$as_dir" && as_dir=.
11442     for ac_exec_ext in '' $ac_executable_extensions; do
11443   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11444     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11445     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11446     break 2
11447   fi
11448 done
11449   done
11450 IFS=$as_save_IFS
11451 
11452   ;;
11453 esac
11454 fi
11455 TAR=$ac_cv_path_TAR
11456 if test -n "$TAR"; then
11457   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11458 $as_echo "$TAR" >&6; }
11459 else
11460   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11461 $as_echo "no" >&6; }
11462 fi
11463 
11464 
11465   test -n "$TAR" && break
11466 done
11467 
11468     else
11469       # If it succeeded, then it was overridden by the user. We will use it
11470       # for the tool.
11471 
11472       # First remove it from the list of overridden variables, so we can test
11473       # for unknown variables in the end.
11474       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11475 
11476       # Check if we try to supply an empty value
11477       if test "x$TAR" = x; then
11478         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
11479 $as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
11480         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11481 $as_echo_n "checking for TAR... " >&6; }
11482         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11483 $as_echo "disabled" >&6; }
11484       else
11485         # Check if the provided tool contains a complete path.
11486         tool_specified="$TAR"
11487         tool_basename="${tool_specified##*/}"
11488         if test "x$tool_basename" = "x$tool_specified"; then
11489           # A command without a complete path is provided, search $PATH.
11490           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
11491 $as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
11492           # Extract the first word of "$tool_basename", so it can be a program name with args.
11493 set dummy $tool_basename; ac_word=$2
11494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11495 $as_echo_n "checking for $ac_word... " >&6; }
11496 if ${ac_cv_path_TAR+:} false; then :
11497   $as_echo_n "(cached) " >&6
11498 else
11499   case $TAR in
11500   [\\/]* | ?:[\\/]*)
11501   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11502   ;;
11503   *)
11504   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11505 for as_dir in $PATH
11506 do
11507   IFS=$as_save_IFS
11508   test -z "$as_dir" && as_dir=.
11509     for ac_exec_ext in '' $ac_executable_extensions; do
11510   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11511     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11512     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11513     break 2
11514   fi
11515 done
11516   done
11517 IFS=$as_save_IFS
11518 
11519   ;;
11520 esac
11521 fi
11522 TAR=$ac_cv_path_TAR
11523 if test -n "$TAR"; then
11524   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11525 $as_echo "$TAR" >&6; }
11526 else
11527   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11528 $as_echo "no" >&6; }
11529 fi
11530 
11531 
11532           if test "x$TAR" = x; then
11533             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11534           fi
11535         else
11536           # Otherwise we believe it is a complete path. Use it as it is.
11537           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11538 $as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11539           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11540 $as_echo_n "checking for TAR... " >&6; }
11541           if test ! -x "$tool_specified"; then
11542             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11543 $as_echo "not found" >&6; }
11544             as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11545           fi
11546           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11547 $as_echo "$tool_specified" >&6; }
11548         fi
11549       fi
11550     fi
11551 
11552   fi
11553 
11554 
11555 
11556   if test "x$TAR" = x; then
11557     as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11558   fi
11559 
11560 
11561 
11562 
11563 
11564   # Publish this variable in the help.
11565 
11566 
11567   if [ -z "${TEE+x}" ]; then
11568     # The variable is not set by user, try to locate tool using the code snippet
11569     for ac_prog in tee
11570 do
11571   # Extract the first word of "$ac_prog", so it can be a program name with args.
11572 set dummy $ac_prog; ac_word=$2
11573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11574 $as_echo_n "checking for $ac_word... " >&6; }
11575 if ${ac_cv_path_TEE+:} false; then :
11576   $as_echo_n "(cached) " >&6
11577 else
11578   case $TEE in
11579   [\\/]* | ?:[\\/]*)
11580   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11581   ;;
11582   *)
11583   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11584 for as_dir in $PATH
11585 do
11586   IFS=$as_save_IFS
11587   test -z "$as_dir" && as_dir=.
11588     for ac_exec_ext in '' $ac_executable_extensions; do
11589   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11590     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11591     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11592     break 2
11593   fi
11594 done
11595   done
11596 IFS=$as_save_IFS
11597 
11598   ;;
11599 esac
11600 fi
11601 TEE=$ac_cv_path_TEE
11602 if test -n "$TEE"; then
11603   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11604 $as_echo "$TEE" >&6; }
11605 else
11606   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11607 $as_echo "no" >&6; }
11608 fi
11609 
11610 
11611   test -n "$TEE" && break
11612 done
11613 
11614   else
11615     # The variable is set, but is it from the command line or the environment?
11616 
11617     # Try to remove the string !TEE! from our list.
11618     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11619     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11620       # If it failed, the variable was not from the command line. Ignore it,
11621       # but warn the user (except for BASH, which is always set by the calling BASH).
11622       if test "xTEE" != xBASH; then
11623         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11624 $as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11625       fi
11626       # Try to locate tool using the code snippet
11627       for ac_prog in tee
11628 do
11629   # Extract the first word of "$ac_prog", so it can be a program name with args.
11630 set dummy $ac_prog; ac_word=$2
11631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11632 $as_echo_n "checking for $ac_word... " >&6; }
11633 if ${ac_cv_path_TEE+:} false; then :
11634   $as_echo_n "(cached) " >&6
11635 else
11636   case $TEE in
11637   [\\/]* | ?:[\\/]*)
11638   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11639   ;;
11640   *)
11641   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11642 for as_dir in $PATH
11643 do
11644   IFS=$as_save_IFS
11645   test -z "$as_dir" && as_dir=.
11646     for ac_exec_ext in '' $ac_executable_extensions; do
11647   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11648     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11649     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11650     break 2
11651   fi
11652 done
11653   done
11654 IFS=$as_save_IFS
11655 
11656   ;;
11657 esac
11658 fi
11659 TEE=$ac_cv_path_TEE
11660 if test -n "$TEE"; then
11661   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11662 $as_echo "$TEE" >&6; }
11663 else
11664   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11665 $as_echo "no" >&6; }
11666 fi
11667 
11668 
11669   test -n "$TEE" && break
11670 done
11671 
11672     else
11673       # If it succeeded, then it was overridden by the user. We will use it
11674       # for the tool.
11675 
11676       # First remove it from the list of overridden variables, so we can test
11677       # for unknown variables in the end.
11678       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11679 
11680       # Check if we try to supply an empty value
11681       if test "x$TEE" = x; then
11682         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11683 $as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11684         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11685 $as_echo_n "checking for TEE... " >&6; }
11686         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11687 $as_echo "disabled" >&6; }
11688       else
11689         # Check if the provided tool contains a complete path.
11690         tool_specified="$TEE"
11691         tool_basename="${tool_specified##*/}"
11692         if test "x$tool_basename" = "x$tool_specified"; then
11693           # A command without a complete path is provided, search $PATH.
11694           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11695 $as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11696           # Extract the first word of "$tool_basename", so it can be a program name with args.
11697 set dummy $tool_basename; ac_word=$2
11698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11699 $as_echo_n "checking for $ac_word... " >&6; }
11700 if ${ac_cv_path_TEE+:} false; then :
11701   $as_echo_n "(cached) " >&6
11702 else
11703   case $TEE in
11704   [\\/]* | ?:[\\/]*)
11705   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11706   ;;
11707   *)
11708   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11709 for as_dir in $PATH
11710 do
11711   IFS=$as_save_IFS
11712   test -z "$as_dir" && as_dir=.
11713     for ac_exec_ext in '' $ac_executable_extensions; do
11714   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11715     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11716     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11717     break 2
11718   fi
11719 done
11720   done
11721 IFS=$as_save_IFS
11722 
11723   ;;
11724 esac
11725 fi
11726 TEE=$ac_cv_path_TEE
11727 if test -n "$TEE"; then
11728   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11729 $as_echo "$TEE" >&6; }
11730 else
11731   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11732 $as_echo "no" >&6; }
11733 fi
11734 
11735 
11736           if test "x$TEE" = x; then
11737             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11738           fi
11739         else
11740           # Otherwise we believe it is a complete path. Use it as it is.
11741           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11742 $as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11743           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11744 $as_echo_n "checking for TEE... " >&6; }
11745           if test ! -x "$tool_specified"; then
11746             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11747 $as_echo "not found" >&6; }
11748             as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11749           fi
11750           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11751 $as_echo "$tool_specified" >&6; }
11752         fi
11753       fi
11754     fi
11755 
11756   fi
11757 
11758 
11759 
11760   if test "x$TEE" = x; then
11761     as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11762   fi
11763 
11764 
11765 
11766 
11767 
11768   # Publish this variable in the help.
11769 
11770 
11771   if [ -z "${TOUCH+x}" ]; then
11772     # The variable is not set by user, try to locate tool using the code snippet
11773     for ac_prog in touch
11774 do
11775   # Extract the first word of "$ac_prog", so it can be a program name with args.
11776 set dummy $ac_prog; ac_word=$2
11777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11778 $as_echo_n "checking for $ac_word... " >&6; }
11779 if ${ac_cv_path_TOUCH+:} false; then :
11780   $as_echo_n "(cached) " >&6
11781 else
11782   case $TOUCH in
11783   [\\/]* | ?:[\\/]*)
11784   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11785   ;;
11786   *)
11787   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11788 for as_dir in $PATH
11789 do
11790   IFS=$as_save_IFS
11791   test -z "$as_dir" && as_dir=.
11792     for ac_exec_ext in '' $ac_executable_extensions; do
11793   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11794     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11795     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11796     break 2
11797   fi
11798 done
11799   done
11800 IFS=$as_save_IFS
11801 
11802   ;;
11803 esac
11804 fi
11805 TOUCH=$ac_cv_path_TOUCH
11806 if test -n "$TOUCH"; then
11807   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11808 $as_echo "$TOUCH" >&6; }
11809 else
11810   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11811 $as_echo "no" >&6; }
11812 fi
11813 
11814 
11815   test -n "$TOUCH" && break
11816 done
11817 
11818   else
11819     # The variable is set, but is it from the command line or the environment?
11820 
11821     # Try to remove the string !TOUCH! from our list.
11822     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11823     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11824       # If it failed, the variable was not from the command line. Ignore it,
11825       # but warn the user (except for BASH, which is always set by the calling BASH).
11826       if test "xTOUCH" != xBASH; then
11827         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11828 $as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11829       fi
11830       # Try to locate tool using the code snippet
11831       for ac_prog in touch
11832 do
11833   # Extract the first word of "$ac_prog", so it can be a program name with args.
11834 set dummy $ac_prog; ac_word=$2
11835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11836 $as_echo_n "checking for $ac_word... " >&6; }
11837 if ${ac_cv_path_TOUCH+:} false; then :
11838   $as_echo_n "(cached) " >&6
11839 else
11840   case $TOUCH in
11841   [\\/]* | ?:[\\/]*)
11842   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11843   ;;
11844   *)
11845   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11846 for as_dir in $PATH
11847 do
11848   IFS=$as_save_IFS
11849   test -z "$as_dir" && as_dir=.
11850     for ac_exec_ext in '' $ac_executable_extensions; do
11851   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11852     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11853     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11854     break 2
11855   fi
11856 done
11857   done
11858 IFS=$as_save_IFS
11859 
11860   ;;
11861 esac
11862 fi
11863 TOUCH=$ac_cv_path_TOUCH
11864 if test -n "$TOUCH"; then
11865   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11866 $as_echo "$TOUCH" >&6; }
11867 else
11868   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11869 $as_echo "no" >&6; }
11870 fi
11871 
11872 
11873   test -n "$TOUCH" && break
11874 done
11875 
11876     else
11877       # If it succeeded, then it was overridden by the user. We will use it
11878       # for the tool.
11879 
11880       # First remove it from the list of overridden variables, so we can test
11881       # for unknown variables in the end.
11882       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11883 
11884       # Check if we try to supply an empty value
11885       if test "x$TOUCH" = x; then
11886         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11887 $as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11888         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11889 $as_echo_n "checking for TOUCH... " >&6; }
11890         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11891 $as_echo "disabled" >&6; }
11892       else
11893         # Check if the provided tool contains a complete path.
11894         tool_specified="$TOUCH"
11895         tool_basename="${tool_specified##*/}"
11896         if test "x$tool_basename" = "x$tool_specified"; then
11897           # A command without a complete path is provided, search $PATH.
11898           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11899 $as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11900           # Extract the first word of "$tool_basename", so it can be a program name with args.
11901 set dummy $tool_basename; ac_word=$2
11902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11903 $as_echo_n "checking for $ac_word... " >&6; }
11904 if ${ac_cv_path_TOUCH+:} false; then :
11905   $as_echo_n "(cached) " >&6
11906 else
11907   case $TOUCH in
11908   [\\/]* | ?:[\\/]*)
11909   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11910   ;;
11911   *)
11912   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11913 for as_dir in $PATH
11914 do
11915   IFS=$as_save_IFS
11916   test -z "$as_dir" && as_dir=.
11917     for ac_exec_ext in '' $ac_executable_extensions; do
11918   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11919     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11920     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11921     break 2
11922   fi
11923 done
11924   done
11925 IFS=$as_save_IFS
11926 
11927   ;;
11928 esac
11929 fi
11930 TOUCH=$ac_cv_path_TOUCH
11931 if test -n "$TOUCH"; then
11932   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11933 $as_echo "$TOUCH" >&6; }
11934 else
11935   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11936 $as_echo "no" >&6; }
11937 fi
11938 
11939 
11940           if test "x$TOUCH" = x; then
11941             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11942           fi
11943         else
11944           # Otherwise we believe it is a complete path. Use it as it is.
11945           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11946 $as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11947           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11948 $as_echo_n "checking for TOUCH... " >&6; }
11949           if test ! -x "$tool_specified"; then
11950             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11951 $as_echo "not found" >&6; }
11952             as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11953           fi
11954           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11955 $as_echo "$tool_specified" >&6; }
11956         fi
11957       fi
11958     fi
11959 
11960   fi
11961 
11962 
11963 
11964   if test "x$TOUCH" = x; then
11965     as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11966   fi
11967 
11968 
11969 
11970 
11971 
11972   # Publish this variable in the help.
11973 
11974 
11975   if [ -z "${TR+x}" ]; then
11976     # The variable is not set by user, try to locate tool using the code snippet
11977     for ac_prog in tr
11978 do
11979   # Extract the first word of "$ac_prog", so it can be a program name with args.
11980 set dummy $ac_prog; ac_word=$2
11981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11982 $as_echo_n "checking for $ac_word... " >&6; }
11983 if ${ac_cv_path_TR+:} false; then :
11984   $as_echo_n "(cached) " >&6
11985 else
11986   case $TR in
11987   [\\/]* | ?:[\\/]*)
11988   ac_cv_path_TR="$TR" # Let the user override the test with a path.
11989   ;;
11990   *)
11991   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11992 for as_dir in $PATH
11993 do
11994   IFS=$as_save_IFS
11995   test -z "$as_dir" && as_dir=.
11996     for ac_exec_ext in '' $ac_executable_extensions; do
11997   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11998     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11999     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12000     break 2
12001   fi
12002 done
12003   done
12004 IFS=$as_save_IFS
12005 
12006   ;;
12007 esac
12008 fi
12009 TR=$ac_cv_path_TR
12010 if test -n "$TR"; then
12011   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12012 $as_echo "$TR" >&6; }
12013 else
12014   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12015 $as_echo "no" >&6; }
12016 fi
12017 
12018 
12019   test -n "$TR" && break
12020 done
12021 
12022   else
12023     # The variable is set, but is it from the command line or the environment?
12024 
12025     # Try to remove the string !TR! from our list.
12026     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
12027     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12028       # If it failed, the variable was not from the command line. Ignore it,
12029       # but warn the user (except for BASH, which is always set by the calling BASH).
12030       if test "xTR" != xBASH; then
12031         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
12032 $as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
12033       fi
12034       # Try to locate tool using the code snippet
12035       for ac_prog in tr
12036 do
12037   # Extract the first word of "$ac_prog", so it can be a program name with args.
12038 set dummy $ac_prog; ac_word=$2
12039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12040 $as_echo_n "checking for $ac_word... " >&6; }
12041 if ${ac_cv_path_TR+:} false; then :
12042   $as_echo_n "(cached) " >&6
12043 else
12044   case $TR in
12045   [\\/]* | ?:[\\/]*)
12046   ac_cv_path_TR="$TR" # Let the user override the test with a path.
12047   ;;
12048   *)
12049   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12050 for as_dir in $PATH
12051 do
12052   IFS=$as_save_IFS
12053   test -z "$as_dir" && as_dir=.
12054     for ac_exec_ext in '' $ac_executable_extensions; do
12055   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12056     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12057     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12058     break 2
12059   fi
12060 done
12061   done
12062 IFS=$as_save_IFS
12063 
12064   ;;
12065 esac
12066 fi
12067 TR=$ac_cv_path_TR
12068 if test -n "$TR"; then
12069   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12070 $as_echo "$TR" >&6; }
12071 else
12072   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12073 $as_echo "no" >&6; }
12074 fi
12075 
12076 
12077   test -n "$TR" && break
12078 done
12079 
12080     else
12081       # If it succeeded, then it was overridden by the user. We will use it
12082       # for the tool.
12083 
12084       # First remove it from the list of overridden variables, so we can test
12085       # for unknown variables in the end.
12086       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12087 
12088       # Check if we try to supply an empty value
12089       if test "x$TR" = x; then
12090         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
12091 $as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
12092         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12093 $as_echo_n "checking for TR... " >&6; }
12094         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12095 $as_echo "disabled" >&6; }
12096       else
12097         # Check if the provided tool contains a complete path.
12098         tool_specified="$TR"
12099         tool_basename="${tool_specified##*/}"
12100         if test "x$tool_basename" = "x$tool_specified"; then
12101           # A command without a complete path is provided, search $PATH.
12102           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
12103 $as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
12104           # Extract the first word of "$tool_basename", so it can be a program name with args.
12105 set dummy $tool_basename; ac_word=$2
12106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12107 $as_echo_n "checking for $ac_word... " >&6; }
12108 if ${ac_cv_path_TR+:} false; then :
12109   $as_echo_n "(cached) " >&6
12110 else
12111   case $TR in
12112   [\\/]* | ?:[\\/]*)
12113   ac_cv_path_TR="$TR" # Let the user override the test with a path.
12114   ;;
12115   *)
12116   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12117 for as_dir in $PATH
12118 do
12119   IFS=$as_save_IFS
12120   test -z "$as_dir" && as_dir=.
12121     for ac_exec_ext in '' $ac_executable_extensions; do
12122   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12123     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12124     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12125     break 2
12126   fi
12127 done
12128   done
12129 IFS=$as_save_IFS
12130 
12131   ;;
12132 esac
12133 fi
12134 TR=$ac_cv_path_TR
12135 if test -n "$TR"; then
12136   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12137 $as_echo "$TR" >&6; }
12138 else
12139   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12140 $as_echo "no" >&6; }
12141 fi
12142 
12143 
12144           if test "x$TR" = x; then
12145             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12146           fi
12147         else
12148           # Otherwise we believe it is a complete path. Use it as it is.
12149           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
12150 $as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
12151           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12152 $as_echo_n "checking for TR... " >&6; }
12153           if test ! -x "$tool_specified"; then
12154             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12155 $as_echo "not found" >&6; }
12156             as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
12157           fi
12158           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12159 $as_echo "$tool_specified" >&6; }
12160         fi
12161       fi
12162     fi
12163 
12164   fi
12165 
12166 
12167 
12168   if test "x$TR" = x; then
12169     as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
12170   fi
12171 
12172 
12173 
12174 
12175 
12176   # Publish this variable in the help.
12177 
12178 
12179   if [ -z "${UNAME+x}" ]; then
12180     # The variable is not set by user, try to locate tool using the code snippet
12181     for ac_prog in uname
12182 do
12183   # Extract the first word of "$ac_prog", so it can be a program name with args.
12184 set dummy $ac_prog; ac_word=$2
12185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12186 $as_echo_n "checking for $ac_word... " >&6; }
12187 if ${ac_cv_path_UNAME+:} false; then :
12188   $as_echo_n "(cached) " >&6
12189 else
12190   case $UNAME in
12191   [\\/]* | ?:[\\/]*)
12192   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12193   ;;
12194   *)
12195   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12196 for as_dir in $PATH
12197 do
12198   IFS=$as_save_IFS
12199   test -z "$as_dir" && as_dir=.
12200     for ac_exec_ext in '' $ac_executable_extensions; do
12201   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12202     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12203     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12204     break 2
12205   fi
12206 done
12207   done
12208 IFS=$as_save_IFS
12209 
12210   ;;
12211 esac
12212 fi
12213 UNAME=$ac_cv_path_UNAME
12214 if test -n "$UNAME"; then
12215   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12216 $as_echo "$UNAME" >&6; }
12217 else
12218   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12219 $as_echo "no" >&6; }
12220 fi
12221 
12222 
12223   test -n "$UNAME" && break
12224 done
12225 
12226   else
12227     # The variable is set, but is it from the command line or the environment?
12228 
12229     # Try to remove the string !UNAME! from our list.
12230     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
12231     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12232       # If it failed, the variable was not from the command line. Ignore it,
12233       # but warn the user (except for BASH, which is always set by the calling BASH).
12234       if test "xUNAME" != xBASH; then
12235         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
12236 $as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
12237       fi
12238       # Try to locate tool using the code snippet
12239       for ac_prog in uname
12240 do
12241   # Extract the first word of "$ac_prog", so it can be a program name with args.
12242 set dummy $ac_prog; ac_word=$2
12243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12244 $as_echo_n "checking for $ac_word... " >&6; }
12245 if ${ac_cv_path_UNAME+:} false; then :
12246   $as_echo_n "(cached) " >&6
12247 else
12248   case $UNAME in
12249   [\\/]* | ?:[\\/]*)
12250   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12251   ;;
12252   *)
12253   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12254 for as_dir in $PATH
12255 do
12256   IFS=$as_save_IFS
12257   test -z "$as_dir" && as_dir=.
12258     for ac_exec_ext in '' $ac_executable_extensions; do
12259   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12260     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12261     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12262     break 2
12263   fi
12264 done
12265   done
12266 IFS=$as_save_IFS
12267 
12268   ;;
12269 esac
12270 fi
12271 UNAME=$ac_cv_path_UNAME
12272 if test -n "$UNAME"; then
12273   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12274 $as_echo "$UNAME" >&6; }
12275 else
12276   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12277 $as_echo "no" >&6; }
12278 fi
12279 
12280 
12281   test -n "$UNAME" && break
12282 done
12283 
12284     else
12285       # If it succeeded, then it was overridden by the user. We will use it
12286       # for the tool.
12287 
12288       # First remove it from the list of overridden variables, so we can test
12289       # for unknown variables in the end.
12290       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12291 
12292       # Check if we try to supply an empty value
12293       if test "x$UNAME" = x; then
12294         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
12295 $as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
12296         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12297 $as_echo_n "checking for UNAME... " >&6; }
12298         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12299 $as_echo "disabled" >&6; }
12300       else
12301         # Check if the provided tool contains a complete path.
12302         tool_specified="$UNAME"
12303         tool_basename="${tool_specified##*/}"
12304         if test "x$tool_basename" = "x$tool_specified"; then
12305           # A command without a complete path is provided, search $PATH.
12306           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
12307 $as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
12308           # Extract the first word of "$tool_basename", so it can be a program name with args.
12309 set dummy $tool_basename; ac_word=$2
12310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12311 $as_echo_n "checking for $ac_word... " >&6; }
12312 if ${ac_cv_path_UNAME+:} false; then :
12313   $as_echo_n "(cached) " >&6
12314 else
12315   case $UNAME in
12316   [\\/]* | ?:[\\/]*)
12317   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12318   ;;
12319   *)
12320   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12321 for as_dir in $PATH
12322 do
12323   IFS=$as_save_IFS
12324   test -z "$as_dir" && as_dir=.
12325     for ac_exec_ext in '' $ac_executable_extensions; do
12326   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12327     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12328     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12329     break 2
12330   fi
12331 done
12332   done
12333 IFS=$as_save_IFS
12334 
12335   ;;
12336 esac
12337 fi
12338 UNAME=$ac_cv_path_UNAME
12339 if test -n "$UNAME"; then
12340   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12341 $as_echo "$UNAME" >&6; }
12342 else
12343   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12344 $as_echo "no" >&6; }
12345 fi
12346 
12347 
12348           if test "x$UNAME" = x; then
12349             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12350           fi
12351         else
12352           # Otherwise we believe it is a complete path. Use it as it is.
12353           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
12354 $as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
12355           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12356 $as_echo_n "checking for UNAME... " >&6; }
12357           if test ! -x "$tool_specified"; then
12358             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12359 $as_echo "not found" >&6; }
12360             as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
12361           fi
12362           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12363 $as_echo "$tool_specified" >&6; }
12364         fi
12365       fi
12366     fi
12367 
12368   fi
12369 
12370 
12371 
12372   if test "x$UNAME" = x; then
12373     as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
12374   fi
12375 
12376 
12377 
12378 
12379 
12380   # Publish this variable in the help.
12381 
12382 
12383   if [ -z "${UNIQ+x}" ]; then
12384     # The variable is not set by user, try to locate tool using the code snippet
12385     for ac_prog in uniq
12386 do
12387   # Extract the first word of "$ac_prog", so it can be a program name with args.
12388 set dummy $ac_prog; ac_word=$2
12389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12390 $as_echo_n "checking for $ac_word... " >&6; }
12391 if ${ac_cv_path_UNIQ+:} false; then :
12392   $as_echo_n "(cached) " >&6
12393 else
12394   case $UNIQ in
12395   [\\/]* | ?:[\\/]*)
12396   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12397   ;;
12398   *)
12399   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12400 for as_dir in $PATH
12401 do
12402   IFS=$as_save_IFS
12403   test -z "$as_dir" && as_dir=.
12404     for ac_exec_ext in '' $ac_executable_extensions; do
12405   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12406     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12407     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12408     break 2
12409   fi
12410 done
12411   done
12412 IFS=$as_save_IFS
12413 
12414   ;;
12415 esac
12416 fi
12417 UNIQ=$ac_cv_path_UNIQ
12418 if test -n "$UNIQ"; then
12419   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12420 $as_echo "$UNIQ" >&6; }
12421 else
12422   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12423 $as_echo "no" >&6; }
12424 fi
12425 
12426 
12427   test -n "$UNIQ" && break
12428 done
12429 
12430   else
12431     # The variable is set, but is it from the command line or the environment?
12432 
12433     # Try to remove the string !UNIQ! from our list.
12434     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
12435     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12436       # If it failed, the variable was not from the command line. Ignore it,
12437       # but warn the user (except for BASH, which is always set by the calling BASH).
12438       if test "xUNIQ" != xBASH; then
12439         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
12440 $as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
12441       fi
12442       # Try to locate tool using the code snippet
12443       for ac_prog in uniq
12444 do
12445   # Extract the first word of "$ac_prog", so it can be a program name with args.
12446 set dummy $ac_prog; ac_word=$2
12447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12448 $as_echo_n "checking for $ac_word... " >&6; }
12449 if ${ac_cv_path_UNIQ+:} false; then :
12450   $as_echo_n "(cached) " >&6
12451 else
12452   case $UNIQ in
12453   [\\/]* | ?:[\\/]*)
12454   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12455   ;;
12456   *)
12457   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12458 for as_dir in $PATH
12459 do
12460   IFS=$as_save_IFS
12461   test -z "$as_dir" && as_dir=.
12462     for ac_exec_ext in '' $ac_executable_extensions; do
12463   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12464     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12465     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12466     break 2
12467   fi
12468 done
12469   done
12470 IFS=$as_save_IFS
12471 
12472   ;;
12473 esac
12474 fi
12475 UNIQ=$ac_cv_path_UNIQ
12476 if test -n "$UNIQ"; then
12477   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12478 $as_echo "$UNIQ" >&6; }
12479 else
12480   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12481 $as_echo "no" >&6; }
12482 fi
12483 
12484 
12485   test -n "$UNIQ" && break
12486 done
12487 
12488     else
12489       # If it succeeded, then it was overridden by the user. We will use it
12490       # for the tool.
12491 
12492       # First remove it from the list of overridden variables, so we can test
12493       # for unknown variables in the end.
12494       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12495 
12496       # Check if we try to supply an empty value
12497       if test "x$UNIQ" = x; then
12498         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
12499 $as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
12500         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12501 $as_echo_n "checking for UNIQ... " >&6; }
12502         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12503 $as_echo "disabled" >&6; }
12504       else
12505         # Check if the provided tool contains a complete path.
12506         tool_specified="$UNIQ"
12507         tool_basename="${tool_specified##*/}"
12508         if test "x$tool_basename" = "x$tool_specified"; then
12509           # A command without a complete path is provided, search $PATH.
12510           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12511 $as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12512           # Extract the first word of "$tool_basename", so it can be a program name with args.
12513 set dummy $tool_basename; ac_word=$2
12514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12515 $as_echo_n "checking for $ac_word... " >&6; }
12516 if ${ac_cv_path_UNIQ+:} false; then :
12517   $as_echo_n "(cached) " >&6
12518 else
12519   case $UNIQ in
12520   [\\/]* | ?:[\\/]*)
12521   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12522   ;;
12523   *)
12524   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12525 for as_dir in $PATH
12526 do
12527   IFS=$as_save_IFS
12528   test -z "$as_dir" && as_dir=.
12529     for ac_exec_ext in '' $ac_executable_extensions; do
12530   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12531     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12532     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12533     break 2
12534   fi
12535 done
12536   done
12537 IFS=$as_save_IFS
12538 
12539   ;;
12540 esac
12541 fi
12542 UNIQ=$ac_cv_path_UNIQ
12543 if test -n "$UNIQ"; then
12544   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12545 $as_echo "$UNIQ" >&6; }
12546 else
12547   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12548 $as_echo "no" >&6; }
12549 fi
12550 
12551 
12552           if test "x$UNIQ" = x; then
12553             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12554           fi
12555         else
12556           # Otherwise we believe it is a complete path. Use it as it is.
12557           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12558 $as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12559           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12560 $as_echo_n "checking for UNIQ... " >&6; }
12561           if test ! -x "$tool_specified"; then
12562             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12563 $as_echo "not found" >&6; }
12564             as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12565           fi
12566           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12567 $as_echo "$tool_specified" >&6; }
12568         fi
12569       fi
12570     fi
12571 
12572   fi
12573 
12574 
12575 
12576   if test "x$UNIQ" = x; then
12577     as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12578   fi
12579 
12580 
12581 
12582 
12583 
12584   # Publish this variable in the help.
12585 
12586 
12587   if [ -z "${WC+x}" ]; then
12588     # The variable is not set by user, try to locate tool using the code snippet
12589     for ac_prog in wc
12590 do
12591   # Extract the first word of "$ac_prog", so it can be a program name with args.
12592 set dummy $ac_prog; ac_word=$2
12593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12594 $as_echo_n "checking for $ac_word... " >&6; }
12595 if ${ac_cv_path_WC+:} false; then :
12596   $as_echo_n "(cached) " >&6
12597 else
12598   case $WC in
12599   [\\/]* | ?:[\\/]*)
12600   ac_cv_path_WC="$WC" # Let the user override the test with a path.
12601   ;;
12602   *)
12603   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12604 for as_dir in $PATH
12605 do
12606   IFS=$as_save_IFS
12607   test -z "$as_dir" && as_dir=.
12608     for ac_exec_ext in '' $ac_executable_extensions; do
12609   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12610     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12611     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12612     break 2
12613   fi
12614 done
12615   done
12616 IFS=$as_save_IFS
12617 
12618   ;;
12619 esac
12620 fi
12621 WC=$ac_cv_path_WC
12622 if test -n "$WC"; then
12623   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12624 $as_echo "$WC" >&6; }
12625 else
12626   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12627 $as_echo "no" >&6; }
12628 fi
12629 
12630 
12631   test -n "$WC" && break
12632 done
12633 
12634   else
12635     # The variable is set, but is it from the command line or the environment?
12636 
12637     # Try to remove the string !WC! from our list.
12638     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12639     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12640       # If it failed, the variable was not from the command line. Ignore it,
12641       # but warn the user (except for BASH, which is always set by the calling BASH).
12642       if test "xWC" != xBASH; then
12643         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12644 $as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12645       fi
12646       # Try to locate tool using the code snippet
12647       for ac_prog in wc
12648 do
12649   # Extract the first word of "$ac_prog", so it can be a program name with args.
12650 set dummy $ac_prog; ac_word=$2
12651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12652 $as_echo_n "checking for $ac_word... " >&6; }
12653 if ${ac_cv_path_WC+:} false; then :
12654   $as_echo_n "(cached) " >&6
12655 else
12656   case $WC in
12657   [\\/]* | ?:[\\/]*)
12658   ac_cv_path_WC="$WC" # Let the user override the test with a path.
12659   ;;
12660   *)
12661   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12662 for as_dir in $PATH
12663 do
12664   IFS=$as_save_IFS
12665   test -z "$as_dir" && as_dir=.
12666     for ac_exec_ext in '' $ac_executable_extensions; do
12667   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12668     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12669     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12670     break 2
12671   fi
12672 done
12673   done
12674 IFS=$as_save_IFS
12675 
12676   ;;
12677 esac
12678 fi
12679 WC=$ac_cv_path_WC
12680 if test -n "$WC"; then
12681   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12682 $as_echo "$WC" >&6; }
12683 else
12684   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12685 $as_echo "no" >&6; }
12686 fi
12687 
12688 
12689   test -n "$WC" && break
12690 done
12691 
12692     else
12693       # If it succeeded, then it was overridden by the user. We will use it
12694       # for the tool.
12695 
12696       # First remove it from the list of overridden variables, so we can test
12697       # for unknown variables in the end.
12698       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12699 
12700       # Check if we try to supply an empty value
12701       if test "x$WC" = x; then
12702         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12703 $as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12704         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12705 $as_echo_n "checking for WC... " >&6; }
12706         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12707 $as_echo "disabled" >&6; }
12708       else
12709         # Check if the provided tool contains a complete path.
12710         tool_specified="$WC"
12711         tool_basename="${tool_specified##*/}"
12712         if test "x$tool_basename" = "x$tool_specified"; then
12713           # A command without a complete path is provided, search $PATH.
12714           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12715 $as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12716           # Extract the first word of "$tool_basename", so it can be a program name with args.
12717 set dummy $tool_basename; ac_word=$2
12718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12719 $as_echo_n "checking for $ac_word... " >&6; }
12720 if ${ac_cv_path_WC+:} false; then :
12721   $as_echo_n "(cached) " >&6
12722 else
12723   case $WC in
12724   [\\/]* | ?:[\\/]*)
12725   ac_cv_path_WC="$WC" # Let the user override the test with a path.
12726   ;;
12727   *)
12728   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12729 for as_dir in $PATH
12730 do
12731   IFS=$as_save_IFS
12732   test -z "$as_dir" && as_dir=.
12733     for ac_exec_ext in '' $ac_executable_extensions; do
12734   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12735     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12736     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12737     break 2
12738   fi
12739 done
12740   done
12741 IFS=$as_save_IFS
12742 
12743   ;;
12744 esac
12745 fi
12746 WC=$ac_cv_path_WC
12747 if test -n "$WC"; then
12748   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12749 $as_echo "$WC" >&6; }
12750 else
12751   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12752 $as_echo "no" >&6; }
12753 fi
12754 
12755 
12756           if test "x$WC" = x; then
12757             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12758           fi
12759         else
12760           # Otherwise we believe it is a complete path. Use it as it is.
12761           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12762 $as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12763           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12764 $as_echo_n "checking for WC... " >&6; }
12765           if test ! -x "$tool_specified"; then
12766             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12767 $as_echo "not found" >&6; }
12768             as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12769           fi
12770           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12771 $as_echo "$tool_specified" >&6; }
12772         fi
12773       fi
12774     fi
12775 
12776   fi
12777 
12778 
12779 
12780   if test "x$WC" = x; then
12781     as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12782   fi
12783 
12784 
12785 
12786 
12787 
12788   # Publish this variable in the help.
12789 
12790 
12791   if [ -z "${WHICH+x}" ]; then
12792     # The variable is not set by user, try to locate tool using the code snippet
12793     for ac_prog in which
12794 do
12795   # Extract the first word of "$ac_prog", so it can be a program name with args.
12796 set dummy $ac_prog; ac_word=$2
12797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12798 $as_echo_n "checking for $ac_word... " >&6; }
12799 if ${ac_cv_path_WHICH+:} false; then :
12800   $as_echo_n "(cached) " >&6
12801 else
12802   case $WHICH in
12803   [\\/]* | ?:[\\/]*)
12804   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12805   ;;
12806   *)
12807   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12808 for as_dir in $PATH
12809 do
12810   IFS=$as_save_IFS
12811   test -z "$as_dir" && as_dir=.
12812     for ac_exec_ext in '' $ac_executable_extensions; do
12813   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12814     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12815     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12816     break 2
12817   fi
12818 done
12819   done
12820 IFS=$as_save_IFS
12821 
12822   ;;
12823 esac
12824 fi
12825 WHICH=$ac_cv_path_WHICH
12826 if test -n "$WHICH"; then
12827   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12828 $as_echo "$WHICH" >&6; }
12829 else
12830   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12831 $as_echo "no" >&6; }
12832 fi
12833 
12834 
12835   test -n "$WHICH" && break
12836 done
12837 
12838   else
12839     # The variable is set, but is it from the command line or the environment?
12840 
12841     # Try to remove the string !WHICH! from our list.
12842     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12843     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12844       # If it failed, the variable was not from the command line. Ignore it,
12845       # but warn the user (except for BASH, which is always set by the calling BASH).
12846       if test "xWHICH" != xBASH; then
12847         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12848 $as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12849       fi
12850       # Try to locate tool using the code snippet
12851       for ac_prog in which
12852 do
12853   # Extract the first word of "$ac_prog", so it can be a program name with args.
12854 set dummy $ac_prog; ac_word=$2
12855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12856 $as_echo_n "checking for $ac_word... " >&6; }
12857 if ${ac_cv_path_WHICH+:} false; then :
12858   $as_echo_n "(cached) " >&6
12859 else
12860   case $WHICH in
12861   [\\/]* | ?:[\\/]*)
12862   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12863   ;;
12864   *)
12865   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12866 for as_dir in $PATH
12867 do
12868   IFS=$as_save_IFS
12869   test -z "$as_dir" && as_dir=.
12870     for ac_exec_ext in '' $ac_executable_extensions; do
12871   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12872     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12873     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12874     break 2
12875   fi
12876 done
12877   done
12878 IFS=$as_save_IFS
12879 
12880   ;;
12881 esac
12882 fi
12883 WHICH=$ac_cv_path_WHICH
12884 if test -n "$WHICH"; then
12885   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12886 $as_echo "$WHICH" >&6; }
12887 else
12888   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12889 $as_echo "no" >&6; }
12890 fi
12891 
12892 
12893   test -n "$WHICH" && break
12894 done
12895 
12896     else
12897       # If it succeeded, then it was overridden by the user. We will use it
12898       # for the tool.
12899 
12900       # First remove it from the list of overridden variables, so we can test
12901       # for unknown variables in the end.
12902       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12903 
12904       # Check if we try to supply an empty value
12905       if test "x$WHICH" = x; then
12906         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12907 $as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12908         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12909 $as_echo_n "checking for WHICH... " >&6; }
12910         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12911 $as_echo "disabled" >&6; }
12912       else
12913         # Check if the provided tool contains a complete path.
12914         tool_specified="$WHICH"
12915         tool_basename="${tool_specified##*/}"
12916         if test "x$tool_basename" = "x$tool_specified"; then
12917           # A command without a complete path is provided, search $PATH.
12918           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12919 $as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12920           # Extract the first word of "$tool_basename", so it can be a program name with args.
12921 set dummy $tool_basename; ac_word=$2
12922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12923 $as_echo_n "checking for $ac_word... " >&6; }
12924 if ${ac_cv_path_WHICH+:} false; then :
12925   $as_echo_n "(cached) " >&6
12926 else
12927   case $WHICH in
12928   [\\/]* | ?:[\\/]*)
12929   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12930   ;;
12931   *)
12932   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12933 for as_dir in $PATH
12934 do
12935   IFS=$as_save_IFS
12936   test -z "$as_dir" && as_dir=.
12937     for ac_exec_ext in '' $ac_executable_extensions; do
12938   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12939     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12940     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12941     break 2
12942   fi
12943 done
12944   done
12945 IFS=$as_save_IFS
12946 
12947   ;;
12948 esac
12949 fi
12950 WHICH=$ac_cv_path_WHICH
12951 if test -n "$WHICH"; then
12952   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12953 $as_echo "$WHICH" >&6; }
12954 else
12955   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12956 $as_echo "no" >&6; }
12957 fi
12958 
12959 
12960           if test "x$WHICH" = x; then
12961             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12962           fi
12963         else
12964           # Otherwise we believe it is a complete path. Use it as it is.
12965           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12966 $as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12967           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12968 $as_echo_n "checking for WHICH... " >&6; }
12969           if test ! -x "$tool_specified"; then
12970             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12971 $as_echo "not found" >&6; }
12972             as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12973           fi
12974           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12975 $as_echo "$tool_specified" >&6; }
12976         fi
12977       fi
12978     fi
12979 
12980   fi
12981 
12982 
12983 
12984   if test "x$WHICH" = x; then
12985     as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12986   fi
12987 
12988 
12989 
12990 
12991 
12992   # Publish this variable in the help.
12993 
12994 
12995   if [ -z "${XARGS+x}" ]; then
12996     # The variable is not set by user, try to locate tool using the code snippet
12997     for ac_prog in xargs
12998 do
12999   # Extract the first word of "$ac_prog", so it can be a program name with args.
13000 set dummy $ac_prog; ac_word=$2
13001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13002 $as_echo_n "checking for $ac_word... " >&6; }
13003 if ${ac_cv_path_XARGS+:} false; then :
13004   $as_echo_n "(cached) " >&6
13005 else
13006   case $XARGS in
13007   [\\/]* | ?:[\\/]*)
13008   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13009   ;;
13010   *)
13011   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13012 for as_dir in $PATH
13013 do
13014   IFS=$as_save_IFS
13015   test -z "$as_dir" && as_dir=.
13016     for ac_exec_ext in '' $ac_executable_extensions; do
13017   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13018     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13019     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13020     break 2
13021   fi
13022 done
13023   done
13024 IFS=$as_save_IFS
13025 
13026   ;;
13027 esac
13028 fi
13029 XARGS=$ac_cv_path_XARGS
13030 if test -n "$XARGS"; then
13031   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13032 $as_echo "$XARGS" >&6; }
13033 else
13034   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13035 $as_echo "no" >&6; }
13036 fi
13037 
13038 
13039   test -n "$XARGS" && break
13040 done
13041 
13042   else
13043     # The variable is set, but is it from the command line or the environment?
13044 
13045     # Try to remove the string !XARGS! from our list.
13046     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
13047     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13048       # If it failed, the variable was not from the command line. Ignore it,
13049       # but warn the user (except for BASH, which is always set by the calling BASH).
13050       if test "xXARGS" != xBASH; then
13051         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
13052 $as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
13053       fi
13054       # Try to locate tool using the code snippet
13055       for ac_prog in xargs
13056 do
13057   # Extract the first word of "$ac_prog", so it can be a program name with args.
13058 set dummy $ac_prog; ac_word=$2
13059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13060 $as_echo_n "checking for $ac_word... " >&6; }
13061 if ${ac_cv_path_XARGS+:} false; then :
13062   $as_echo_n "(cached) " >&6
13063 else
13064   case $XARGS in
13065   [\\/]* | ?:[\\/]*)
13066   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13067   ;;
13068   *)
13069   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13070 for as_dir in $PATH
13071 do
13072   IFS=$as_save_IFS
13073   test -z "$as_dir" && as_dir=.
13074     for ac_exec_ext in '' $ac_executable_extensions; do
13075   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13076     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13077     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13078     break 2
13079   fi
13080 done
13081   done
13082 IFS=$as_save_IFS
13083 
13084   ;;
13085 esac
13086 fi
13087 XARGS=$ac_cv_path_XARGS
13088 if test -n "$XARGS"; then
13089   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13090 $as_echo "$XARGS" >&6; }
13091 else
13092   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13093 $as_echo "no" >&6; }
13094 fi
13095 
13096 
13097   test -n "$XARGS" && break
13098 done
13099 
13100     else
13101       # If it succeeded, then it was overridden by the user. We will use it
13102       # for the tool.
13103 
13104       # First remove it from the list of overridden variables, so we can test
13105       # for unknown variables in the end.
13106       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13107 
13108       # Check if we try to supply an empty value
13109       if test "x$XARGS" = x; then
13110         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
13111 $as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
13112         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13113 $as_echo_n "checking for XARGS... " >&6; }
13114         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13115 $as_echo "disabled" >&6; }
13116       else
13117         # Check if the provided tool contains a complete path.
13118         tool_specified="$XARGS"
13119         tool_basename="${tool_specified##*/}"
13120         if test "x$tool_basename" = "x$tool_specified"; then
13121           # A command without a complete path is provided, search $PATH.
13122           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
13123 $as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
13124           # Extract the first word of "$tool_basename", so it can be a program name with args.
13125 set dummy $tool_basename; ac_word=$2
13126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13127 $as_echo_n "checking for $ac_word... " >&6; }
13128 if ${ac_cv_path_XARGS+:} false; then :
13129   $as_echo_n "(cached) " >&6
13130 else
13131   case $XARGS in
13132   [\\/]* | ?:[\\/]*)
13133   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13134   ;;
13135   *)
13136   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13137 for as_dir in $PATH
13138 do
13139   IFS=$as_save_IFS
13140   test -z "$as_dir" && as_dir=.
13141     for ac_exec_ext in '' $ac_executable_extensions; do
13142   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13143     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13144     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13145     break 2
13146   fi
13147 done
13148   done
13149 IFS=$as_save_IFS
13150 
13151   ;;
13152 esac
13153 fi
13154 XARGS=$ac_cv_path_XARGS
13155 if test -n "$XARGS"; then
13156   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13157 $as_echo "$XARGS" >&6; }
13158 else
13159   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13160 $as_echo "no" >&6; }
13161 fi
13162 
13163 
13164           if test "x$XARGS" = x; then
13165             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13166           fi
13167         else
13168           # Otherwise we believe it is a complete path. Use it as it is.
13169           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
13170 $as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
13171           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13172 $as_echo_n "checking for XARGS... " >&6; }
13173           if test ! -x "$tool_specified"; then
13174             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13175 $as_echo "not found" >&6; }
13176             as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
13177           fi
13178           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13179 $as_echo "$tool_specified" >&6; }
13180         fi
13181       fi
13182     fi
13183 
13184   fi
13185 
13186 
13187 
13188   if test "x$XARGS" = x; then
13189     as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
13190   fi
13191 
13192 
13193 
13194   # Then required tools that require some special treatment.
13195 
13196 
13197   # Publish this variable in the help.
13198 
13199 
13200   if [ -z "${AWK+x}" ]; then
13201     # The variable is not set by user, try to locate tool using the code snippet
13202     for ac_prog in gawk mawk nawk awk
13203 do
13204   # Extract the first word of "$ac_prog", so it can be a program name with args.
13205 set dummy $ac_prog; ac_word=$2
13206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13207 $as_echo_n "checking for $ac_word... " >&6; }
13208 if ${ac_cv_prog_AWK+:} false; then :
13209   $as_echo_n "(cached) " >&6
13210 else
13211   if test -n "$AWK"; then
13212   ac_cv_prog_AWK="$AWK" # Let the user override the test.
13213 else
13214 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13215 for as_dir in $PATH
13216 do
13217   IFS=$as_save_IFS
13218   test -z "$as_dir" && as_dir=.
13219     for ac_exec_ext in '' $ac_executable_extensions; do
13220   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13221     ac_cv_prog_AWK="$ac_prog"
13222     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13223     break 2
13224   fi
13225 done
13226   done
13227 IFS=$as_save_IFS
13228 
13229 fi
13230 fi
13231 AWK=$ac_cv_prog_AWK
13232 if test -n "$AWK"; then
13233   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13234 $as_echo "$AWK" >&6; }
13235 else
13236   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13237 $as_echo "no" >&6; }
13238 fi
13239 
13240 
13241   test -n "$AWK" && break
13242 done
13243 
13244   else
13245     # The variable is set, but is it from the command line or the environment?
13246 
13247     # Try to remove the string !AWK! from our list.
13248     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
13249     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13250       # If it failed, the variable was not from the command line. Ignore it,
13251       # but warn the user (except for BASH, which is always set by the calling BASH).
13252       if test "xAWK" != xBASH; then
13253         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
13254 $as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
13255       fi
13256       # Try to locate tool using the code snippet
13257       for ac_prog in gawk mawk nawk awk
13258 do
13259   # Extract the first word of "$ac_prog", so it can be a program name with args.
13260 set dummy $ac_prog; ac_word=$2
13261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13262 $as_echo_n "checking for $ac_word... " >&6; }
13263 if ${ac_cv_prog_AWK+:} false; then :
13264   $as_echo_n "(cached) " >&6
13265 else
13266   if test -n "$AWK"; then
13267   ac_cv_prog_AWK="$AWK" # Let the user override the test.
13268 else
13269 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13270 for as_dir in $PATH
13271 do
13272   IFS=$as_save_IFS
13273   test -z "$as_dir" && as_dir=.
13274     for ac_exec_ext in '' $ac_executable_extensions; do
13275   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13276     ac_cv_prog_AWK="$ac_prog"
13277     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13278     break 2
13279   fi
13280 done
13281   done
13282 IFS=$as_save_IFS
13283 
13284 fi
13285 fi
13286 AWK=$ac_cv_prog_AWK
13287 if test -n "$AWK"; then
13288   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13289 $as_echo "$AWK" >&6; }
13290 else
13291   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13292 $as_echo "no" >&6; }
13293 fi
13294 
13295 
13296   test -n "$AWK" && break
13297 done
13298 
13299     else
13300       # If it succeeded, then it was overridden by the user. We will use it
13301       # for the tool.
13302 
13303       # First remove it from the list of overridden variables, so we can test
13304       # for unknown variables in the end.
13305       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13306 
13307       # Check if we try to supply an empty value
13308       if test "x$AWK" = x; then
13309         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
13310 $as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
13311         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13312 $as_echo_n "checking for AWK... " >&6; }
13313         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13314 $as_echo "disabled" >&6; }
13315       else
13316         # Check if the provided tool contains a complete path.
13317         tool_specified="$AWK"
13318         tool_basename="${tool_specified##*/}"
13319         if test "x$tool_basename" = "x$tool_specified"; then
13320           # A command without a complete path is provided, search $PATH.
13321           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
13322 $as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
13323           # Extract the first word of "$tool_basename", so it can be a program name with args.
13324 set dummy $tool_basename; ac_word=$2
13325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13326 $as_echo_n "checking for $ac_word... " >&6; }
13327 if ${ac_cv_path_AWK+:} false; then :
13328   $as_echo_n "(cached) " >&6
13329 else
13330   case $AWK in
13331   [\\/]* | ?:[\\/]*)
13332   ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
13333   ;;
13334   *)
13335   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13336 for as_dir in $PATH
13337 do
13338   IFS=$as_save_IFS
13339   test -z "$as_dir" && as_dir=.
13340     for ac_exec_ext in '' $ac_executable_extensions; do
13341   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13342     ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
13343     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13344     break 2
13345   fi
13346 done
13347   done
13348 IFS=$as_save_IFS
13349 
13350   ;;
13351 esac
13352 fi
13353 AWK=$ac_cv_path_AWK
13354 if test -n "$AWK"; then
13355   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13356 $as_echo "$AWK" >&6; }
13357 else
13358   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13359 $as_echo "no" >&6; }
13360 fi
13361 
13362 
13363           if test "x$AWK" = x; then
13364             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13365           fi
13366         else
13367           # Otherwise we believe it is a complete path. Use it as it is.
13368           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
13369 $as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
13370           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13371 $as_echo_n "checking for AWK... " >&6; }
13372           if test ! -x "$tool_specified"; then
13373             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13374 $as_echo "not found" >&6; }
13375             as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
13376           fi
13377           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13378 $as_echo "$tool_specified" >&6; }
13379         fi
13380       fi
13381     fi
13382 
13383   fi
13384 
13385 
13386   if test "x$AWK" = x; then
13387     as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
13388   fi
13389 
13390 
13391 
13392 
13393   # Publish this variable in the help.
13394 
13395 
13396   if [ -z "${GREP+x}" ]; then
13397     # The variable is not set by user, try to locate tool using the code snippet
13398     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13399 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13400 if ${ac_cv_path_GREP+:} false; then :
13401   $as_echo_n "(cached) " >&6
13402 else
13403   if test -z "$GREP"; then
13404   ac_path_GREP_found=false
13405   # Loop through the user's path and test for each of PROGNAME-LIST
13406   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13407 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13408 do
13409   IFS=$as_save_IFS
13410   test -z "$as_dir" && as_dir=.
13411     for ac_prog in grep ggrep; do
13412     for ac_exec_ext in '' $ac_executable_extensions; do
13413       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13414       as_fn_executable_p "$ac_path_GREP" || continue
13415 # Check for GNU ac_path_GREP and select it if it is found.
13416   # Check for GNU $ac_path_GREP
13417 case `"$ac_path_GREP" --version 2>&1` in
13418 *GNU*)
13419   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13420 *)
13421   ac_count=0
13422   $as_echo_n 0123456789 >"conftest.in"
13423   while :
13424   do
13425     cat "conftest.in" "conftest.in" >"conftest.tmp"
13426     mv "conftest.tmp" "conftest.in"
13427     cp "conftest.in" "conftest.nl"
13428     $as_echo 'GREP' >> "conftest.nl"
13429     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13430     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13431     as_fn_arith $ac_count + 1 && ac_count=$as_val
13432     if test $ac_count -gt ${ac_path_GREP_max-0}; then
13433       # Best one so far, save it but keep looking for a better one
13434       ac_cv_path_GREP="$ac_path_GREP"
13435       ac_path_GREP_max=$ac_count
13436     fi
13437     # 10*(2^10) chars as input seems more than enough
13438     test $ac_count -gt 10 && break
13439   done
13440   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13441 esac
13442 
13443       $ac_path_GREP_found && break 3
13444     done
13445   done
13446   done
13447 IFS=$as_save_IFS
13448   if test -z "$ac_cv_path_GREP"; then
13449     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13450   fi
13451 else
13452   ac_cv_path_GREP=$GREP
13453 fi
13454 
13455 fi
13456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13457 $as_echo "$ac_cv_path_GREP" >&6; }
13458  GREP="$ac_cv_path_GREP"
13459 
13460 
13461   else
13462     # The variable is set, but is it from the command line or the environment?
13463 
13464     # Try to remove the string !GREP! from our list.
13465     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
13466     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13467       # If it failed, the variable was not from the command line. Ignore it,
13468       # but warn the user (except for BASH, which is always set by the calling BASH).
13469       if test "xGREP" != xBASH; then
13470         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
13471 $as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
13472       fi
13473       # Try to locate tool using the code snippet
13474       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13475 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13476 if ${ac_cv_path_GREP+:} false; then :
13477   $as_echo_n "(cached) " >&6
13478 else
13479   if test -z "$GREP"; then
13480   ac_path_GREP_found=false
13481   # Loop through the user's path and test for each of PROGNAME-LIST
13482   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13483 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13484 do
13485   IFS=$as_save_IFS
13486   test -z "$as_dir" && as_dir=.
13487     for ac_prog in grep ggrep; do
13488     for ac_exec_ext in '' $ac_executable_extensions; do
13489       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13490       as_fn_executable_p "$ac_path_GREP" || continue
13491 # Check for GNU ac_path_GREP and select it if it is found.
13492   # Check for GNU $ac_path_GREP
13493 case `"$ac_path_GREP" --version 2>&1` in
13494 *GNU*)
13495   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13496 *)
13497   ac_count=0
13498   $as_echo_n 0123456789 >"conftest.in"
13499   while :
13500   do
13501     cat "conftest.in" "conftest.in" >"conftest.tmp"
13502     mv "conftest.tmp" "conftest.in"
13503     cp "conftest.in" "conftest.nl"
13504     $as_echo 'GREP' >> "conftest.nl"
13505     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13506     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13507     as_fn_arith $ac_count + 1 && ac_count=$as_val
13508     if test $ac_count -gt ${ac_path_GREP_max-0}; then
13509       # Best one so far, save it but keep looking for a better one
13510       ac_cv_path_GREP="$ac_path_GREP"
13511       ac_path_GREP_max=$ac_count
13512     fi
13513     # 10*(2^10) chars as input seems more than enough
13514     test $ac_count -gt 10 && break
13515   done
13516   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13517 esac
13518 
13519       $ac_path_GREP_found && break 3
13520     done
13521   done
13522   done
13523 IFS=$as_save_IFS
13524   if test -z "$ac_cv_path_GREP"; then
13525     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13526   fi
13527 else
13528   ac_cv_path_GREP=$GREP
13529 fi
13530 
13531 fi
13532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13533 $as_echo "$ac_cv_path_GREP" >&6; }
13534  GREP="$ac_cv_path_GREP"
13535 
13536 
13537     else
13538       # If it succeeded, then it was overridden by the user. We will use it
13539       # for the tool.
13540 
13541       # First remove it from the list of overridden variables, so we can test
13542       # for unknown variables in the end.
13543       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13544 
13545       # Check if we try to supply an empty value
13546       if test "x$GREP" = x; then
13547         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13548 $as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13549         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13550 $as_echo_n "checking for GREP... " >&6; }
13551         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13552 $as_echo "disabled" >&6; }
13553       else
13554         # Check if the provided tool contains a complete path.
13555         tool_specified="$GREP"
13556         tool_basename="${tool_specified##*/}"
13557         if test "x$tool_basename" = "x$tool_specified"; then
13558           # A command without a complete path is provided, search $PATH.
13559           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13560 $as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13561           # Extract the first word of "$tool_basename", so it can be a program name with args.
13562 set dummy $tool_basename; ac_word=$2
13563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13564 $as_echo_n "checking for $ac_word... " >&6; }
13565 if ${ac_cv_path_GREP+:} false; then :
13566   $as_echo_n "(cached) " >&6
13567 else
13568   case $GREP in
13569   [\\/]* | ?:[\\/]*)
13570   ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13571   ;;
13572   *)
13573   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13574 for as_dir in $PATH
13575 do
13576   IFS=$as_save_IFS
13577   test -z "$as_dir" && as_dir=.
13578     for ac_exec_ext in '' $ac_executable_extensions; do
13579   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13580     ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13581     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13582     break 2
13583   fi
13584 done
13585   done
13586 IFS=$as_save_IFS
13587 
13588   ;;
13589 esac
13590 fi
13591 GREP=$ac_cv_path_GREP
13592 if test -n "$GREP"; then
13593   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13594 $as_echo "$GREP" >&6; }
13595 else
13596   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13597 $as_echo "no" >&6; }
13598 fi
13599 
13600 
13601           if test "x$GREP" = x; then
13602             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13603           fi
13604         else
13605           # Otherwise we believe it is a complete path. Use it as it is.
13606           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13607 $as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13608           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13609 $as_echo_n "checking for GREP... " >&6; }
13610           if test ! -x "$tool_specified"; then
13611             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13612 $as_echo "not found" >&6; }
13613             as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13614           fi
13615           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13616 $as_echo "$tool_specified" >&6; }
13617         fi
13618       fi
13619     fi
13620 
13621   fi
13622 
13623 
13624   if test "x$GREP" = x; then
13625     as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13626   fi
13627 
13628 
13629 
13630 
13631   # Publish this variable in the help.
13632 
13633 
13634   if [ -z "${EGREP+x}" ]; then
13635     # The variable is not set by user, try to locate tool using the code snippet
13636     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13637 $as_echo_n "checking for egrep... " >&6; }
13638 if ${ac_cv_path_EGREP+:} false; then :
13639   $as_echo_n "(cached) " >&6
13640 else
13641   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13642    then ac_cv_path_EGREP="$GREP -E"
13643    else
13644      if test -z "$EGREP"; then
13645   ac_path_EGREP_found=false
13646   # Loop through the user's path and test for each of PROGNAME-LIST
13647   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13648 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13649 do
13650   IFS=$as_save_IFS
13651   test -z "$as_dir" && as_dir=.
13652     for ac_prog in egrep; do
13653     for ac_exec_ext in '' $ac_executable_extensions; do
13654       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13655       as_fn_executable_p "$ac_path_EGREP" || continue
13656 # Check for GNU ac_path_EGREP and select it if it is found.
13657   # Check for GNU $ac_path_EGREP
13658 case `"$ac_path_EGREP" --version 2>&1` in
13659 *GNU*)
13660   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13661 *)
13662   ac_count=0
13663   $as_echo_n 0123456789 >"conftest.in"
13664   while :
13665   do
13666     cat "conftest.in" "conftest.in" >"conftest.tmp"
13667     mv "conftest.tmp" "conftest.in"
13668     cp "conftest.in" "conftest.nl"
13669     $as_echo 'EGREP' >> "conftest.nl"
13670     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13671     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13672     as_fn_arith $ac_count + 1 && ac_count=$as_val
13673     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13674       # Best one so far, save it but keep looking for a better one
13675       ac_cv_path_EGREP="$ac_path_EGREP"
13676       ac_path_EGREP_max=$ac_count
13677     fi
13678     # 10*(2^10) chars as input seems more than enough
13679     test $ac_count -gt 10 && break
13680   done
13681   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13682 esac
13683 
13684       $ac_path_EGREP_found && break 3
13685     done
13686   done
13687   done
13688 IFS=$as_save_IFS
13689   if test -z "$ac_cv_path_EGREP"; then
13690     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13691   fi
13692 else
13693   ac_cv_path_EGREP=$EGREP
13694 fi
13695 
13696    fi
13697 fi
13698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13699 $as_echo "$ac_cv_path_EGREP" >&6; }
13700  EGREP="$ac_cv_path_EGREP"
13701 
13702 
13703   else
13704     # The variable is set, but is it from the command line or the environment?
13705 
13706     # Try to remove the string !EGREP! from our list.
13707     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13708     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13709       # If it failed, the variable was not from the command line. Ignore it,
13710       # but warn the user (except for BASH, which is always set by the calling BASH).
13711       if test "xEGREP" != xBASH; then
13712         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13713 $as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13714       fi
13715       # Try to locate tool using the code snippet
13716       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13717 $as_echo_n "checking for egrep... " >&6; }
13718 if ${ac_cv_path_EGREP+:} false; then :
13719   $as_echo_n "(cached) " >&6
13720 else
13721   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13722    then ac_cv_path_EGREP="$GREP -E"
13723    else
13724      if test -z "$EGREP"; then
13725   ac_path_EGREP_found=false
13726   # Loop through the user's path and test for each of PROGNAME-LIST
13727   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13728 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13729 do
13730   IFS=$as_save_IFS
13731   test -z "$as_dir" && as_dir=.
13732     for ac_prog in egrep; do
13733     for ac_exec_ext in '' $ac_executable_extensions; do
13734       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13735       as_fn_executable_p "$ac_path_EGREP" || continue
13736 # Check for GNU ac_path_EGREP and select it if it is found.
13737   # Check for GNU $ac_path_EGREP
13738 case `"$ac_path_EGREP" --version 2>&1` in
13739 *GNU*)
13740   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13741 *)
13742   ac_count=0
13743   $as_echo_n 0123456789 >"conftest.in"
13744   while :
13745   do
13746     cat "conftest.in" "conftest.in" >"conftest.tmp"
13747     mv "conftest.tmp" "conftest.in"
13748     cp "conftest.in" "conftest.nl"
13749     $as_echo 'EGREP' >> "conftest.nl"
13750     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13751     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13752     as_fn_arith $ac_count + 1 && ac_count=$as_val
13753     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13754       # Best one so far, save it but keep looking for a better one
13755       ac_cv_path_EGREP="$ac_path_EGREP"
13756       ac_path_EGREP_max=$ac_count
13757     fi
13758     # 10*(2^10) chars as input seems more than enough
13759     test $ac_count -gt 10 && break
13760   done
13761   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13762 esac
13763 
13764       $ac_path_EGREP_found && break 3
13765     done
13766   done
13767   done
13768 IFS=$as_save_IFS
13769   if test -z "$ac_cv_path_EGREP"; then
13770     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13771   fi
13772 else
13773   ac_cv_path_EGREP=$EGREP
13774 fi
13775 
13776    fi
13777 fi
13778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13779 $as_echo "$ac_cv_path_EGREP" >&6; }
13780  EGREP="$ac_cv_path_EGREP"
13781 
13782 
13783     else
13784       # If it succeeded, then it was overridden by the user. We will use it
13785       # for the tool.
13786 
13787       # First remove it from the list of overridden variables, so we can test
13788       # for unknown variables in the end.
13789       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13790 
13791       # Check if we try to supply an empty value
13792       if test "x$EGREP" = x; then
13793         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13794 $as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13795         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13796 $as_echo_n "checking for EGREP... " >&6; }
13797         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13798 $as_echo "disabled" >&6; }
13799       else
13800         # Check if the provided tool contains a complete path.
13801         tool_specified="$EGREP"
13802         tool_basename="${tool_specified##*/}"
13803         if test "x$tool_basename" = "x$tool_specified"; then
13804           # A command without a complete path is provided, search $PATH.
13805           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13806 $as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13807           # Extract the first word of "$tool_basename", so it can be a program name with args.
13808 set dummy $tool_basename; ac_word=$2
13809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13810 $as_echo_n "checking for $ac_word... " >&6; }
13811 if ${ac_cv_path_EGREP+:} false; then :
13812   $as_echo_n "(cached) " >&6
13813 else
13814   case $EGREP in
13815   [\\/]* | ?:[\\/]*)
13816   ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13817   ;;
13818   *)
13819   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13820 for as_dir in $PATH
13821 do
13822   IFS=$as_save_IFS
13823   test -z "$as_dir" && as_dir=.
13824     for ac_exec_ext in '' $ac_executable_extensions; do
13825   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13826     ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13827     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13828     break 2
13829   fi
13830 done
13831   done
13832 IFS=$as_save_IFS
13833 
13834   ;;
13835 esac
13836 fi
13837 EGREP=$ac_cv_path_EGREP
13838 if test -n "$EGREP"; then
13839   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13840 $as_echo "$EGREP" >&6; }
13841 else
13842   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13843 $as_echo "no" >&6; }
13844 fi
13845 
13846 
13847           if test "x$EGREP" = x; then
13848             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13849           fi
13850         else
13851           # Otherwise we believe it is a complete path. Use it as it is.
13852           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13853 $as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13854           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13855 $as_echo_n "checking for EGREP... " >&6; }
13856           if test ! -x "$tool_specified"; then
13857             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13858 $as_echo "not found" >&6; }
13859             as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13860           fi
13861           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13862 $as_echo "$tool_specified" >&6; }
13863         fi
13864       fi
13865     fi
13866 
13867   fi
13868 
13869 
13870   if test "x$EGREP" = x; then
13871     as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13872   fi
13873 
13874 
13875 
13876 
13877   # Publish this variable in the help.
13878 
13879 
13880   if [ -z "${FGREP+x}" ]; then
13881     # The variable is not set by user, try to locate tool using the code snippet
13882     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13883 $as_echo_n "checking for fgrep... " >&6; }
13884 if ${ac_cv_path_FGREP+:} false; then :
13885   $as_echo_n "(cached) " >&6
13886 else
13887   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13888    then ac_cv_path_FGREP="$GREP -F"
13889    else
13890      if test -z "$FGREP"; then
13891   ac_path_FGREP_found=false
13892   # Loop through the user's path and test for each of PROGNAME-LIST
13893   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13894 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13895 do
13896   IFS=$as_save_IFS
13897   test -z "$as_dir" && as_dir=.
13898     for ac_prog in fgrep; do
13899     for ac_exec_ext in '' $ac_executable_extensions; do
13900       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13901       as_fn_executable_p "$ac_path_FGREP" || continue
13902 # Check for GNU ac_path_FGREP and select it if it is found.
13903   # Check for GNU $ac_path_FGREP
13904 case `"$ac_path_FGREP" --version 2>&1` in
13905 *GNU*)
13906   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13907 *)
13908   ac_count=0
13909   $as_echo_n 0123456789 >"conftest.in"
13910   while :
13911   do
13912     cat "conftest.in" "conftest.in" >"conftest.tmp"
13913     mv "conftest.tmp" "conftest.in"
13914     cp "conftest.in" "conftest.nl"
13915     $as_echo 'FGREP' >> "conftest.nl"
13916     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13917     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13918     as_fn_arith $ac_count + 1 && ac_count=$as_val
13919     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13920       # Best one so far, save it but keep looking for a better one
13921       ac_cv_path_FGREP="$ac_path_FGREP"
13922       ac_path_FGREP_max=$ac_count
13923     fi
13924     # 10*(2^10) chars as input seems more than enough
13925     test $ac_count -gt 10 && break
13926   done
13927   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13928 esac
13929 
13930       $ac_path_FGREP_found && break 3
13931     done
13932   done
13933   done
13934 IFS=$as_save_IFS
13935   if test -z "$ac_cv_path_FGREP"; then
13936     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13937   fi
13938 else
13939   ac_cv_path_FGREP=$FGREP
13940 fi
13941 
13942    fi
13943 fi
13944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13945 $as_echo "$ac_cv_path_FGREP" >&6; }
13946  FGREP="$ac_cv_path_FGREP"
13947 
13948 
13949   else
13950     # The variable is set, but is it from the command line or the environment?
13951 
13952     # Try to remove the string !FGREP! from our list.
13953     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13954     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13955       # If it failed, the variable was not from the command line. Ignore it,
13956       # but warn the user (except for BASH, which is always set by the calling BASH).
13957       if test "xFGREP" != xBASH; then
13958         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13959 $as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13960       fi
13961       # Try to locate tool using the code snippet
13962       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13963 $as_echo_n "checking for fgrep... " >&6; }
13964 if ${ac_cv_path_FGREP+:} false; then :
13965   $as_echo_n "(cached) " >&6
13966 else
13967   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13968    then ac_cv_path_FGREP="$GREP -F"
13969    else
13970      if test -z "$FGREP"; then
13971   ac_path_FGREP_found=false
13972   # Loop through the user's path and test for each of PROGNAME-LIST
13973   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13974 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13975 do
13976   IFS=$as_save_IFS
13977   test -z "$as_dir" && as_dir=.
13978     for ac_prog in fgrep; do
13979     for ac_exec_ext in '' $ac_executable_extensions; do
13980       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13981       as_fn_executable_p "$ac_path_FGREP" || continue
13982 # Check for GNU ac_path_FGREP and select it if it is found.
13983   # Check for GNU $ac_path_FGREP
13984 case `"$ac_path_FGREP" --version 2>&1` in
13985 *GNU*)
13986   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13987 *)
13988   ac_count=0
13989   $as_echo_n 0123456789 >"conftest.in"
13990   while :
13991   do
13992     cat "conftest.in" "conftest.in" >"conftest.tmp"
13993     mv "conftest.tmp" "conftest.in"
13994     cp "conftest.in" "conftest.nl"
13995     $as_echo 'FGREP' >> "conftest.nl"
13996     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13997     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13998     as_fn_arith $ac_count + 1 && ac_count=$as_val
13999     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
14000       # Best one so far, save it but keep looking for a better one
14001       ac_cv_path_FGREP="$ac_path_FGREP"
14002       ac_path_FGREP_max=$ac_count
14003     fi
14004     # 10*(2^10) chars as input seems more than enough
14005     test $ac_count -gt 10 && break
14006   done
14007   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14008 esac
14009 
14010       $ac_path_FGREP_found && break 3
14011     done
14012   done
14013   done
14014 IFS=$as_save_IFS
14015   if test -z "$ac_cv_path_FGREP"; then
14016     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
14017   fi
14018 else
14019   ac_cv_path_FGREP=$FGREP
14020 fi
14021 
14022    fi
14023 fi
14024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
14025 $as_echo "$ac_cv_path_FGREP" >&6; }
14026  FGREP="$ac_cv_path_FGREP"
14027 
14028 
14029     else
14030       # If it succeeded, then it was overridden by the user. We will use it
14031       # for the tool.
14032 
14033       # First remove it from the list of overridden variables, so we can test
14034       # for unknown variables in the end.
14035       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14036 
14037       # Check if we try to supply an empty value
14038       if test "x$FGREP" = x; then
14039         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
14040 $as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
14041         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14042 $as_echo_n "checking for FGREP... " >&6; }
14043         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14044 $as_echo "disabled" >&6; }
14045       else
14046         # Check if the provided tool contains a complete path.
14047         tool_specified="$FGREP"
14048         tool_basename="${tool_specified##*/}"
14049         if test "x$tool_basename" = "x$tool_specified"; then
14050           # A command without a complete path is provided, search $PATH.
14051           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
14052 $as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
14053           # Extract the first word of "$tool_basename", so it can be a program name with args.
14054 set dummy $tool_basename; ac_word=$2
14055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14056 $as_echo_n "checking for $ac_word... " >&6; }
14057 if ${ac_cv_path_FGREP+:} false; then :
14058   $as_echo_n "(cached) " >&6
14059 else
14060   case $FGREP in
14061   [\\/]* | ?:[\\/]*)
14062   ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
14063   ;;
14064   *)
14065   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14066 for as_dir in $PATH
14067 do
14068   IFS=$as_save_IFS
14069   test -z "$as_dir" && as_dir=.
14070     for ac_exec_ext in '' $ac_executable_extensions; do
14071   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14072     ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
14073     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14074     break 2
14075   fi
14076 done
14077   done
14078 IFS=$as_save_IFS
14079 
14080   ;;
14081 esac
14082 fi
14083 FGREP=$ac_cv_path_FGREP
14084 if test -n "$FGREP"; then
14085   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
14086 $as_echo "$FGREP" >&6; }
14087 else
14088   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14089 $as_echo "no" >&6; }
14090 fi
14091 
14092 
14093           if test "x$FGREP" = x; then
14094             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14095           fi
14096         else
14097           # Otherwise we believe it is a complete path. Use it as it is.
14098           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
14099 $as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
14100           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14101 $as_echo_n "checking for FGREP... " >&6; }
14102           if test ! -x "$tool_specified"; then
14103             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14104 $as_echo "not found" >&6; }
14105             as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
14106           fi
14107           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14108 $as_echo "$tool_specified" >&6; }
14109         fi
14110       fi
14111     fi
14112 
14113   fi
14114 
14115 
14116   if test "x$FGREP" = x; then
14117     as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
14118   fi
14119 
14120 
14121 
14122 
14123   # Publish this variable in the help.
14124 
14125 
14126   if [ -z "${SED+x}" ]; then
14127     # The variable is not set by user, try to locate tool using the code snippet
14128     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14129 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
14130 if ${ac_cv_path_SED+:} false; then :
14131   $as_echo_n "(cached) " >&6
14132 else
14133             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14134      for ac_i in 1 2 3 4 5 6 7; do
14135        ac_script="$ac_script$as_nl$ac_script"
14136      done
14137      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14138      { ac_script=; unset ac_script;}
14139      if test -z "$SED"; then
14140   ac_path_SED_found=false
14141   # Loop through the user's path and test for each of PROGNAME-LIST
14142   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14143 for as_dir in $PATH
14144 do
14145   IFS=$as_save_IFS
14146   test -z "$as_dir" && as_dir=.
14147     for ac_prog in sed gsed; do
14148     for ac_exec_ext in '' $ac_executable_extensions; do
14149       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14150       as_fn_executable_p "$ac_path_SED" || continue
14151 # Check for GNU ac_path_SED and select it if it is found.
14152   # Check for GNU $ac_path_SED
14153 case `"$ac_path_SED" --version 2>&1` in
14154 *GNU*)
14155   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14156 *)
14157   ac_count=0
14158   $as_echo_n 0123456789 >"conftest.in"
14159   while :
14160   do
14161     cat "conftest.in" "conftest.in" >"conftest.tmp"
14162     mv "conftest.tmp" "conftest.in"
14163     cp "conftest.in" "conftest.nl"
14164     $as_echo '' >> "conftest.nl"
14165     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14166     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14167     as_fn_arith $ac_count + 1 && ac_count=$as_val
14168     if test $ac_count -gt ${ac_path_SED_max-0}; then
14169       # Best one so far, save it but keep looking for a better one
14170       ac_cv_path_SED="$ac_path_SED"
14171       ac_path_SED_max=$ac_count
14172     fi
14173     # 10*(2^10) chars as input seems more than enough
14174     test $ac_count -gt 10 && break
14175   done
14176   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14177 esac
14178 
14179       $ac_path_SED_found && break 3
14180     done
14181   done
14182   done
14183 IFS=$as_save_IFS
14184   if test -z "$ac_cv_path_SED"; then
14185     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14186   fi
14187 else
14188   ac_cv_path_SED=$SED
14189 fi
14190 
14191 fi
14192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14193 $as_echo "$ac_cv_path_SED" >&6; }
14194  SED="$ac_cv_path_SED"
14195   rm -f conftest.sed
14196 
14197   else
14198     # The variable is set, but is it from the command line or the environment?
14199 
14200     # Try to remove the string !SED! from our list.
14201     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
14202     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14203       # If it failed, the variable was not from the command line. Ignore it,
14204       # but warn the user (except for BASH, which is always set by the calling BASH).
14205       if test "xSED" != xBASH; then
14206         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
14207 $as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
14208       fi
14209       # Try to locate tool using the code snippet
14210       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14211 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
14212 if ${ac_cv_path_SED+:} false; then :
14213   $as_echo_n "(cached) " >&6
14214 else
14215             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14216      for ac_i in 1 2 3 4 5 6 7; do
14217        ac_script="$ac_script$as_nl$ac_script"
14218      done
14219      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14220      { ac_script=; unset ac_script;}
14221      if test -z "$SED"; then
14222   ac_path_SED_found=false
14223   # Loop through the user's path and test for each of PROGNAME-LIST
14224   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14225 for as_dir in $PATH
14226 do
14227   IFS=$as_save_IFS
14228   test -z "$as_dir" && as_dir=.
14229     for ac_prog in sed gsed; do
14230     for ac_exec_ext in '' $ac_executable_extensions; do
14231       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14232       as_fn_executable_p "$ac_path_SED" || continue
14233 # Check for GNU ac_path_SED and select it if it is found.
14234   # Check for GNU $ac_path_SED
14235 case `"$ac_path_SED" --version 2>&1` in
14236 *GNU*)
14237   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14238 *)
14239   ac_count=0
14240   $as_echo_n 0123456789 >"conftest.in"
14241   while :
14242   do
14243     cat "conftest.in" "conftest.in" >"conftest.tmp"
14244     mv "conftest.tmp" "conftest.in"
14245     cp "conftest.in" "conftest.nl"
14246     $as_echo '' >> "conftest.nl"
14247     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14248     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14249     as_fn_arith $ac_count + 1 && ac_count=$as_val
14250     if test $ac_count -gt ${ac_path_SED_max-0}; then
14251       # Best one so far, save it but keep looking for a better one
14252       ac_cv_path_SED="$ac_path_SED"
14253       ac_path_SED_max=$ac_count
14254     fi
14255     # 10*(2^10) chars as input seems more than enough
14256     test $ac_count -gt 10 && break
14257   done
14258   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14259 esac
14260 
14261       $ac_path_SED_found && break 3
14262     done
14263   done
14264   done
14265 IFS=$as_save_IFS
14266   if test -z "$ac_cv_path_SED"; then
14267     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14268   fi
14269 else
14270   ac_cv_path_SED=$SED
14271 fi
14272 
14273 fi
14274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14275 $as_echo "$ac_cv_path_SED" >&6; }
14276  SED="$ac_cv_path_SED"
14277   rm -f conftest.sed
14278 
14279     else
14280       # If it succeeded, then it was overridden by the user. We will use it
14281       # for the tool.
14282 
14283       # First remove it from the list of overridden variables, so we can test
14284       # for unknown variables in the end.
14285       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14286 
14287       # Check if we try to supply an empty value
14288       if test "x$SED" = x; then
14289         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
14290 $as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
14291         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14292 $as_echo_n "checking for SED... " >&6; }
14293         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14294 $as_echo "disabled" >&6; }
14295       else
14296         # Check if the provided tool contains a complete path.
14297         tool_specified="$SED"
14298         tool_basename="${tool_specified##*/}"
14299         if test "x$tool_basename" = "x$tool_specified"; then
14300           # A command without a complete path is provided, search $PATH.
14301           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
14302 $as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
14303           # Extract the first word of "$tool_basename", so it can be a program name with args.
14304 set dummy $tool_basename; ac_word=$2
14305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14306 $as_echo_n "checking for $ac_word... " >&6; }
14307 if ${ac_cv_path_SED+:} false; then :
14308   $as_echo_n "(cached) " >&6
14309 else
14310   case $SED in
14311   [\\/]* | ?:[\\/]*)
14312   ac_cv_path_SED="$SED" # Let the user override the test with a path.
14313   ;;
14314   *)
14315   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14316 for as_dir in $PATH
14317 do
14318   IFS=$as_save_IFS
14319   test -z "$as_dir" && as_dir=.
14320     for ac_exec_ext in '' $ac_executable_extensions; do
14321   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14322     ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
14323     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14324     break 2
14325   fi
14326 done
14327   done
14328 IFS=$as_save_IFS
14329 
14330   ;;
14331 esac
14332 fi
14333 SED=$ac_cv_path_SED
14334 if test -n "$SED"; then
14335   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
14336 $as_echo "$SED" >&6; }
14337 else
14338   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14339 $as_echo "no" >&6; }
14340 fi
14341 
14342 
14343           if test "x$SED" = x; then
14344             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14345           fi
14346         else
14347           # Otherwise we believe it is a complete path. Use it as it is.
14348           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
14349 $as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
14350           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14351 $as_echo_n "checking for SED... " >&6; }
14352           if test ! -x "$tool_specified"; then
14353             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14354 $as_echo "not found" >&6; }
14355             as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
14356           fi
14357           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14358 $as_echo "$tool_specified" >&6; }
14359         fi
14360       fi
14361     fi
14362 
14363   fi
14364 
14365 
14366   if test "x$SED" = x; then
14367     as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
14368   fi
14369 
14370 
14371 
14372   # Always force rm.
14373   RM="$RM -f"
14374 
14375   # pwd behaves differently on various platforms and some don't support the -L flag.
14376   # Always use the bash builtin pwd to get uniform behavior.
14377   THEPWDCMD=pwd
14378 
14379   # These are not required on all platforms
14380 
14381 
14382   # Publish this variable in the help.
14383 
14384 
14385   if [ -z "${CYGPATH+x}" ]; then
14386     # The variable is not set by user, try to locate tool using the code snippet
14387     for ac_prog in cygpath
14388 do
14389   # Extract the first word of "$ac_prog", so it can be a program name with args.
14390 set dummy $ac_prog; ac_word=$2
14391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14392 $as_echo_n "checking for $ac_word... " >&6; }
14393 if ${ac_cv_path_CYGPATH+:} false; then :
14394   $as_echo_n "(cached) " >&6
14395 else
14396   case $CYGPATH in
14397   [\\/]* | ?:[\\/]*)
14398   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14399   ;;
14400   *)
14401   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14402 for as_dir in $PATH
14403 do
14404   IFS=$as_save_IFS
14405   test -z "$as_dir" && as_dir=.
14406     for ac_exec_ext in '' $ac_executable_extensions; do
14407   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14408     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14409     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14410     break 2
14411   fi
14412 done
14413   done
14414 IFS=$as_save_IFS
14415 
14416   ;;
14417 esac
14418 fi
14419 CYGPATH=$ac_cv_path_CYGPATH
14420 if test -n "$CYGPATH"; then
14421   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14422 $as_echo "$CYGPATH" >&6; }
14423 else
14424   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14425 $as_echo "no" >&6; }
14426 fi
14427 
14428 
14429   test -n "$CYGPATH" && break
14430 done
14431 
14432   else
14433     # The variable is set, but is it from the command line or the environment?
14434 
14435     # Try to remove the string !CYGPATH! from our list.
14436     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
14437     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14438       # If it failed, the variable was not from the command line. Ignore it,
14439       # but warn the user (except for BASH, which is always set by the calling BASH).
14440       if test "xCYGPATH" != xBASH; then
14441         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
14442 $as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
14443       fi
14444       # Try to locate tool using the code snippet
14445       for ac_prog in cygpath
14446 do
14447   # Extract the first word of "$ac_prog", so it can be a program name with args.
14448 set dummy $ac_prog; ac_word=$2
14449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14450 $as_echo_n "checking for $ac_word... " >&6; }
14451 if ${ac_cv_path_CYGPATH+:} false; then :
14452   $as_echo_n "(cached) " >&6
14453 else
14454   case $CYGPATH in
14455   [\\/]* | ?:[\\/]*)
14456   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14457   ;;
14458   *)
14459   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14460 for as_dir in $PATH
14461 do
14462   IFS=$as_save_IFS
14463   test -z "$as_dir" && as_dir=.
14464     for ac_exec_ext in '' $ac_executable_extensions; do
14465   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14466     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14467     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14468     break 2
14469   fi
14470 done
14471   done
14472 IFS=$as_save_IFS
14473 
14474   ;;
14475 esac
14476 fi
14477 CYGPATH=$ac_cv_path_CYGPATH
14478 if test -n "$CYGPATH"; then
14479   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14480 $as_echo "$CYGPATH" >&6; }
14481 else
14482   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14483 $as_echo "no" >&6; }
14484 fi
14485 
14486 
14487   test -n "$CYGPATH" && break
14488 done
14489 
14490     else
14491       # If it succeeded, then it was overridden by the user. We will use it
14492       # for the tool.
14493 
14494       # First remove it from the list of overridden variables, so we can test
14495       # for unknown variables in the end.
14496       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14497 
14498       # Check if we try to supply an empty value
14499       if test "x$CYGPATH" = x; then
14500         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
14501 $as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
14502         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14503 $as_echo_n "checking for CYGPATH... " >&6; }
14504         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14505 $as_echo "disabled" >&6; }
14506       else
14507         # Check if the provided tool contains a complete path.
14508         tool_specified="$CYGPATH"
14509         tool_basename="${tool_specified##*/}"
14510         if test "x$tool_basename" = "x$tool_specified"; then
14511           # A command without a complete path is provided, search $PATH.
14512           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14513 $as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14514           # Extract the first word of "$tool_basename", so it can be a program name with args.
14515 set dummy $tool_basename; ac_word=$2
14516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14517 $as_echo_n "checking for $ac_word... " >&6; }
14518 if ${ac_cv_path_CYGPATH+:} false; then :
14519   $as_echo_n "(cached) " >&6
14520 else
14521   case $CYGPATH in
14522   [\\/]* | ?:[\\/]*)
14523   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14524   ;;
14525   *)
14526   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14527 for as_dir in $PATH
14528 do
14529   IFS=$as_save_IFS
14530   test -z "$as_dir" && as_dir=.
14531     for ac_exec_ext in '' $ac_executable_extensions; do
14532   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14533     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14534     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14535     break 2
14536   fi
14537 done
14538   done
14539 IFS=$as_save_IFS
14540 
14541   ;;
14542 esac
14543 fi
14544 CYGPATH=$ac_cv_path_CYGPATH
14545 if test -n "$CYGPATH"; then
14546   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14547 $as_echo "$CYGPATH" >&6; }
14548 else
14549   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14550 $as_echo "no" >&6; }
14551 fi
14552 
14553 
14554           if test "x$CYGPATH" = x; then
14555             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14556           fi
14557         else
14558           # Otherwise we believe it is a complete path. Use it as it is.
14559           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14560 $as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14561           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14562 $as_echo_n "checking for CYGPATH... " >&6; }
14563           if test ! -x "$tool_specified"; then
14564             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14565 $as_echo "not found" >&6; }
14566             as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14567           fi
14568           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14569 $as_echo "$tool_specified" >&6; }
14570         fi
14571       fi
14572     fi
14573 
14574   fi
14575 
14576 
14577 
14578 
14579   # Publish this variable in the help.
14580 
14581 
14582   if [ -z "${READLINK+x}" ]; then
14583     # The variable is not set by user, try to locate tool using the code snippet
14584     for ac_prog in greadlink readlink
14585 do
14586   # Extract the first word of "$ac_prog", so it can be a program name with args.
14587 set dummy $ac_prog; ac_word=$2
14588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14589 $as_echo_n "checking for $ac_word... " >&6; }
14590 if ${ac_cv_path_READLINK+:} false; then :
14591   $as_echo_n "(cached) " >&6
14592 else
14593   case $READLINK in
14594   [\\/]* | ?:[\\/]*)
14595   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14596   ;;
14597   *)
14598   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14599 for as_dir in $PATH
14600 do
14601   IFS=$as_save_IFS
14602   test -z "$as_dir" && as_dir=.
14603     for ac_exec_ext in '' $ac_executable_extensions; do
14604   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14605     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14606     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14607     break 2
14608   fi
14609 done
14610   done
14611 IFS=$as_save_IFS
14612 
14613   ;;
14614 esac
14615 fi
14616 READLINK=$ac_cv_path_READLINK
14617 if test -n "$READLINK"; then
14618   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14619 $as_echo "$READLINK" >&6; }
14620 else
14621   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14622 $as_echo "no" >&6; }
14623 fi
14624 
14625 
14626   test -n "$READLINK" && break
14627 done
14628 
14629   else
14630     # The variable is set, but is it from the command line or the environment?
14631 
14632     # Try to remove the string !READLINK! from our list.
14633     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14634     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14635       # If it failed, the variable was not from the command line. Ignore it,
14636       # but warn the user (except for BASH, which is always set by the calling BASH).
14637       if test "xREADLINK" != xBASH; then
14638         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14639 $as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14640       fi
14641       # Try to locate tool using the code snippet
14642       for ac_prog in greadlink readlink
14643 do
14644   # Extract the first word of "$ac_prog", so it can be a program name with args.
14645 set dummy $ac_prog; ac_word=$2
14646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14647 $as_echo_n "checking for $ac_word... " >&6; }
14648 if ${ac_cv_path_READLINK+:} false; then :
14649   $as_echo_n "(cached) " >&6
14650 else
14651   case $READLINK in
14652   [\\/]* | ?:[\\/]*)
14653   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14654   ;;
14655   *)
14656   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14657 for as_dir in $PATH
14658 do
14659   IFS=$as_save_IFS
14660   test -z "$as_dir" && as_dir=.
14661     for ac_exec_ext in '' $ac_executable_extensions; do
14662   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14663     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14664     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14665     break 2
14666   fi
14667 done
14668   done
14669 IFS=$as_save_IFS
14670 
14671   ;;
14672 esac
14673 fi
14674 READLINK=$ac_cv_path_READLINK
14675 if test -n "$READLINK"; then
14676   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14677 $as_echo "$READLINK" >&6; }
14678 else
14679   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14680 $as_echo "no" >&6; }
14681 fi
14682 
14683 
14684   test -n "$READLINK" && break
14685 done
14686 
14687     else
14688       # If it succeeded, then it was overridden by the user. We will use it
14689       # for the tool.
14690 
14691       # First remove it from the list of overridden variables, so we can test
14692       # for unknown variables in the end.
14693       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14694 
14695       # Check if we try to supply an empty value
14696       if test "x$READLINK" = x; then
14697         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14698 $as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14699         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14700 $as_echo_n "checking for READLINK... " >&6; }
14701         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14702 $as_echo "disabled" >&6; }
14703       else
14704         # Check if the provided tool contains a complete path.
14705         tool_specified="$READLINK"
14706         tool_basename="${tool_specified##*/}"
14707         if test "x$tool_basename" = "x$tool_specified"; then
14708           # A command without a complete path is provided, search $PATH.
14709           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14710 $as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14711           # Extract the first word of "$tool_basename", so it can be a program name with args.
14712 set dummy $tool_basename; ac_word=$2
14713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14714 $as_echo_n "checking for $ac_word... " >&6; }
14715 if ${ac_cv_path_READLINK+:} false; then :
14716   $as_echo_n "(cached) " >&6
14717 else
14718   case $READLINK in
14719   [\\/]* | ?:[\\/]*)
14720   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14721   ;;
14722   *)
14723   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14724 for as_dir in $PATH
14725 do
14726   IFS=$as_save_IFS
14727   test -z "$as_dir" && as_dir=.
14728     for ac_exec_ext in '' $ac_executable_extensions; do
14729   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14730     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14731     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14732     break 2
14733   fi
14734 done
14735   done
14736 IFS=$as_save_IFS
14737 
14738   ;;
14739 esac
14740 fi
14741 READLINK=$ac_cv_path_READLINK
14742 if test -n "$READLINK"; then
14743   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14744 $as_echo "$READLINK" >&6; }
14745 else
14746   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14747 $as_echo "no" >&6; }
14748 fi
14749 
14750 
14751           if test "x$READLINK" = x; then
14752             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14753           fi
14754         else
14755           # Otherwise we believe it is a complete path. Use it as it is.
14756           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14757 $as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14758           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14759 $as_echo_n "checking for READLINK... " >&6; }
14760           if test ! -x "$tool_specified"; then
14761             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14762 $as_echo "not found" >&6; }
14763             as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14764           fi
14765           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14766 $as_echo "$tool_specified" >&6; }
14767         fi
14768       fi
14769     fi
14770 
14771   fi
14772 
14773 
14774 
14775 
14776   # Publish this variable in the help.
14777 
14778 
14779   if [ -z "${DF+x}" ]; then
14780     # The variable is not set by user, try to locate tool using the code snippet
14781     for ac_prog in df
14782 do
14783   # Extract the first word of "$ac_prog", so it can be a program name with args.
14784 set dummy $ac_prog; ac_word=$2
14785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14786 $as_echo_n "checking for $ac_word... " >&6; }
14787 if ${ac_cv_path_DF+:} false; then :
14788   $as_echo_n "(cached) " >&6
14789 else
14790   case $DF in
14791   [\\/]* | ?:[\\/]*)
14792   ac_cv_path_DF="$DF" # Let the user override the test with a path.
14793   ;;
14794   *)
14795   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14796 for as_dir in $PATH
14797 do
14798   IFS=$as_save_IFS
14799   test -z "$as_dir" && as_dir=.
14800     for ac_exec_ext in '' $ac_executable_extensions; do
14801   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14802     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14803     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14804     break 2
14805   fi
14806 done
14807   done
14808 IFS=$as_save_IFS
14809 
14810   ;;
14811 esac
14812 fi
14813 DF=$ac_cv_path_DF
14814 if test -n "$DF"; then
14815   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14816 $as_echo "$DF" >&6; }
14817 else
14818   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14819 $as_echo "no" >&6; }
14820 fi
14821 
14822 
14823   test -n "$DF" && break
14824 done
14825 
14826   else
14827     # The variable is set, but is it from the command line or the environment?
14828 
14829     # Try to remove the string !DF! from our list.
14830     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14831     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14832       # If it failed, the variable was not from the command line. Ignore it,
14833       # but warn the user (except for BASH, which is always set by the calling BASH).
14834       if test "xDF" != xBASH; then
14835         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14836 $as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14837       fi
14838       # Try to locate tool using the code snippet
14839       for ac_prog in df
14840 do
14841   # Extract the first word of "$ac_prog", so it can be a program name with args.
14842 set dummy $ac_prog; ac_word=$2
14843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14844 $as_echo_n "checking for $ac_word... " >&6; }
14845 if ${ac_cv_path_DF+:} false; then :
14846   $as_echo_n "(cached) " >&6
14847 else
14848   case $DF in
14849   [\\/]* | ?:[\\/]*)
14850   ac_cv_path_DF="$DF" # Let the user override the test with a path.
14851   ;;
14852   *)
14853   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14854 for as_dir in $PATH
14855 do
14856   IFS=$as_save_IFS
14857   test -z "$as_dir" && as_dir=.
14858     for ac_exec_ext in '' $ac_executable_extensions; do
14859   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14860     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14861     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14862     break 2
14863   fi
14864 done
14865   done
14866 IFS=$as_save_IFS
14867 
14868   ;;
14869 esac
14870 fi
14871 DF=$ac_cv_path_DF
14872 if test -n "$DF"; then
14873   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14874 $as_echo "$DF" >&6; }
14875 else
14876   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14877 $as_echo "no" >&6; }
14878 fi
14879 
14880 
14881   test -n "$DF" && break
14882 done
14883 
14884     else
14885       # If it succeeded, then it was overridden by the user. We will use it
14886       # for the tool.
14887 
14888       # First remove it from the list of overridden variables, so we can test
14889       # for unknown variables in the end.
14890       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14891 
14892       # Check if we try to supply an empty value
14893       if test "x$DF" = x; then
14894         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14895 $as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14896         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14897 $as_echo_n "checking for DF... " >&6; }
14898         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14899 $as_echo "disabled" >&6; }
14900       else
14901         # Check if the provided tool contains a complete path.
14902         tool_specified="$DF"
14903         tool_basename="${tool_specified##*/}"
14904         if test "x$tool_basename" = "x$tool_specified"; then
14905           # A command without a complete path is provided, search $PATH.
14906           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14907 $as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14908           # Extract the first word of "$tool_basename", so it can be a program name with args.
14909 set dummy $tool_basename; ac_word=$2
14910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14911 $as_echo_n "checking for $ac_word... " >&6; }
14912 if ${ac_cv_path_DF+:} false; then :
14913   $as_echo_n "(cached) " >&6
14914 else
14915   case $DF in
14916   [\\/]* | ?:[\\/]*)
14917   ac_cv_path_DF="$DF" # Let the user override the test with a path.
14918   ;;
14919   *)
14920   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14921 for as_dir in $PATH
14922 do
14923   IFS=$as_save_IFS
14924   test -z "$as_dir" && as_dir=.
14925     for ac_exec_ext in '' $ac_executable_extensions; do
14926   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14927     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14928     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14929     break 2
14930   fi
14931 done
14932   done
14933 IFS=$as_save_IFS
14934 
14935   ;;
14936 esac
14937 fi
14938 DF=$ac_cv_path_DF
14939 if test -n "$DF"; then
14940   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14941 $as_echo "$DF" >&6; }
14942 else
14943   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14944 $as_echo "no" >&6; }
14945 fi
14946 
14947 
14948           if test "x$DF" = x; then
14949             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14950           fi
14951         else
14952           # Otherwise we believe it is a complete path. Use it as it is.
14953           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14954 $as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14955           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14956 $as_echo_n "checking for DF... " >&6; }
14957           if test ! -x "$tool_specified"; then
14958             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14959 $as_echo "not found" >&6; }
14960             as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14961           fi
14962           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14963 $as_echo "$tool_specified" >&6; }
14964         fi
14965       fi
14966     fi
14967 
14968   fi
14969 
14970 
14971 
14972 
14973   # Publish this variable in the help.
14974 
14975 
14976   if [ -z "${CPIO+x}" ]; then
14977     # The variable is not set by user, try to locate tool using the code snippet
14978     for ac_prog in cpio bsdcpio
14979 do
14980   # Extract the first word of "$ac_prog", so it can be a program name with args.
14981 set dummy $ac_prog; ac_word=$2
14982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14983 $as_echo_n "checking for $ac_word... " >&6; }
14984 if ${ac_cv_path_CPIO+:} false; then :
14985   $as_echo_n "(cached) " >&6
14986 else
14987   case $CPIO in
14988   [\\/]* | ?:[\\/]*)
14989   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14990   ;;
14991   *)
14992   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14993 for as_dir in $PATH
14994 do
14995   IFS=$as_save_IFS
14996   test -z "$as_dir" && as_dir=.
14997     for ac_exec_ext in '' $ac_executable_extensions; do
14998   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14999     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15000     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15001     break 2
15002   fi
15003 done
15004   done
15005 IFS=$as_save_IFS
15006 
15007   ;;
15008 esac
15009 fi
15010 CPIO=$ac_cv_path_CPIO
15011 if test -n "$CPIO"; then
15012   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15013 $as_echo "$CPIO" >&6; }
15014 else
15015   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15016 $as_echo "no" >&6; }
15017 fi
15018 
15019 
15020   test -n "$CPIO" && break
15021 done
15022 
15023   else
15024     # The variable is set, but is it from the command line or the environment?
15025 
15026     # Try to remove the string !CPIO! from our list.
15027     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
15028     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15029       # If it failed, the variable was not from the command line. Ignore it,
15030       # but warn the user (except for BASH, which is always set by the calling BASH).
15031       if test "xCPIO" != xBASH; then
15032         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
15033 $as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
15034       fi
15035       # Try to locate tool using the code snippet
15036       for ac_prog in cpio bsdcpio
15037 do
15038   # Extract the first word of "$ac_prog", so it can be a program name with args.
15039 set dummy $ac_prog; ac_word=$2
15040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15041 $as_echo_n "checking for $ac_word... " >&6; }
15042 if ${ac_cv_path_CPIO+:} false; then :
15043   $as_echo_n "(cached) " >&6
15044 else
15045   case $CPIO in
15046   [\\/]* | ?:[\\/]*)
15047   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15048   ;;
15049   *)
15050   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15051 for as_dir in $PATH
15052 do
15053   IFS=$as_save_IFS
15054   test -z "$as_dir" && as_dir=.
15055     for ac_exec_ext in '' $ac_executable_extensions; do
15056   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15057     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15058     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15059     break 2
15060   fi
15061 done
15062   done
15063 IFS=$as_save_IFS
15064 
15065   ;;
15066 esac
15067 fi
15068 CPIO=$ac_cv_path_CPIO
15069 if test -n "$CPIO"; then
15070   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15071 $as_echo "$CPIO" >&6; }
15072 else
15073   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15074 $as_echo "no" >&6; }
15075 fi
15076 
15077 
15078   test -n "$CPIO" && break
15079 done
15080 
15081     else
15082       # If it succeeded, then it was overridden by the user. We will use it
15083       # for the tool.
15084 
15085       # First remove it from the list of overridden variables, so we can test
15086       # for unknown variables in the end.
15087       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15088 
15089       # Check if we try to supply an empty value
15090       if test "x$CPIO" = x; then
15091         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
15092 $as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
15093         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15094 $as_echo_n "checking for CPIO... " >&6; }
15095         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15096 $as_echo "disabled" >&6; }
15097       else
15098         # Check if the provided tool contains a complete path.
15099         tool_specified="$CPIO"
15100         tool_basename="${tool_specified##*/}"
15101         if test "x$tool_basename" = "x$tool_specified"; then
15102           # A command without a complete path is provided, search $PATH.
15103           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
15104 $as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
15105           # Extract the first word of "$tool_basename", so it can be a program name with args.
15106 set dummy $tool_basename; ac_word=$2
15107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15108 $as_echo_n "checking for $ac_word... " >&6; }
15109 if ${ac_cv_path_CPIO+:} false; then :
15110   $as_echo_n "(cached) " >&6
15111 else
15112   case $CPIO in
15113   [\\/]* | ?:[\\/]*)
15114   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15115   ;;
15116   *)
15117   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15118 for as_dir in $PATH
15119 do
15120   IFS=$as_save_IFS
15121   test -z "$as_dir" && as_dir=.
15122     for ac_exec_ext in '' $ac_executable_extensions; do
15123   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15124     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15125     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15126     break 2
15127   fi
15128 done
15129   done
15130 IFS=$as_save_IFS
15131 
15132   ;;
15133 esac
15134 fi
15135 CPIO=$ac_cv_path_CPIO
15136 if test -n "$CPIO"; then
15137   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15138 $as_echo "$CPIO" >&6; }
15139 else
15140   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15141 $as_echo "no" >&6; }
15142 fi
15143 
15144 
15145           if test "x$CPIO" = x; then
15146             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15147           fi
15148         else
15149           # Otherwise we believe it is a complete path. Use it as it is.
15150           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
15151 $as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
15152           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15153 $as_echo_n "checking for CPIO... " >&6; }
15154           if test ! -x "$tool_specified"; then
15155             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15156 $as_echo "not found" >&6; }
15157             as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
15158           fi
15159           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15160 $as_echo "$tool_specified" >&6; }
15161         fi
15162       fi
15163     fi
15164 
15165   fi
15166 
15167 
15168 
15169 
15170   # Publish this variable in the help.
15171 
15172 
15173   if [ -z "${NICE+x}" ]; then
15174     # The variable is not set by user, try to locate tool using the code snippet
15175     for ac_prog in nice
15176 do
15177   # Extract the first word of "$ac_prog", so it can be a program name with args.
15178 set dummy $ac_prog; ac_word=$2
15179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15180 $as_echo_n "checking for $ac_word... " >&6; }
15181 if ${ac_cv_path_NICE+:} false; then :
15182   $as_echo_n "(cached) " >&6
15183 else
15184   case $NICE in
15185   [\\/]* | ?:[\\/]*)
15186   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15187   ;;
15188   *)
15189   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15190 for as_dir in $PATH
15191 do
15192   IFS=$as_save_IFS
15193   test -z "$as_dir" && as_dir=.
15194     for ac_exec_ext in '' $ac_executable_extensions; do
15195   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15196     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15197     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15198     break 2
15199   fi
15200 done
15201   done
15202 IFS=$as_save_IFS
15203 
15204   ;;
15205 esac
15206 fi
15207 NICE=$ac_cv_path_NICE
15208 if test -n "$NICE"; then
15209   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15210 $as_echo "$NICE" >&6; }
15211 else
15212   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15213 $as_echo "no" >&6; }
15214 fi
15215 
15216 
15217   test -n "$NICE" && break
15218 done
15219 
15220   else
15221     # The variable is set, but is it from the command line or the environment?
15222 
15223     # Try to remove the string !NICE! from our list.
15224     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
15225     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15226       # If it failed, the variable was not from the command line. Ignore it,
15227       # but warn the user (except for BASH, which is always set by the calling BASH).
15228       if test "xNICE" != xBASH; then
15229         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
15230 $as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
15231       fi
15232       # Try to locate tool using the code snippet
15233       for ac_prog in nice
15234 do
15235   # Extract the first word of "$ac_prog", so it can be a program name with args.
15236 set dummy $ac_prog; ac_word=$2
15237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15238 $as_echo_n "checking for $ac_word... " >&6; }
15239 if ${ac_cv_path_NICE+:} false; then :
15240   $as_echo_n "(cached) " >&6
15241 else
15242   case $NICE in
15243   [\\/]* | ?:[\\/]*)
15244   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15245   ;;
15246   *)
15247   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15248 for as_dir in $PATH
15249 do
15250   IFS=$as_save_IFS
15251   test -z "$as_dir" && as_dir=.
15252     for ac_exec_ext in '' $ac_executable_extensions; do
15253   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15254     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15255     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15256     break 2
15257   fi
15258 done
15259   done
15260 IFS=$as_save_IFS
15261 
15262   ;;
15263 esac
15264 fi
15265 NICE=$ac_cv_path_NICE
15266 if test -n "$NICE"; then
15267   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15268 $as_echo "$NICE" >&6; }
15269 else
15270   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15271 $as_echo "no" >&6; }
15272 fi
15273 
15274 
15275   test -n "$NICE" && break
15276 done
15277 
15278     else
15279       # If it succeeded, then it was overridden by the user. We will use it
15280       # for the tool.
15281 
15282       # First remove it from the list of overridden variables, so we can test
15283       # for unknown variables in the end.
15284       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15285 
15286       # Check if we try to supply an empty value
15287       if test "x$NICE" = x; then
15288         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
15289 $as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
15290         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15291 $as_echo_n "checking for NICE... " >&6; }
15292         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15293 $as_echo "disabled" >&6; }
15294       else
15295         # Check if the provided tool contains a complete path.
15296         tool_specified="$NICE"
15297         tool_basename="${tool_specified##*/}"
15298         if test "x$tool_basename" = "x$tool_specified"; then
15299           # A command without a complete path is provided, search $PATH.
15300           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
15301 $as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
15302           # Extract the first word of "$tool_basename", so it can be a program name with args.
15303 set dummy $tool_basename; ac_word=$2
15304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15305 $as_echo_n "checking for $ac_word... " >&6; }
15306 if ${ac_cv_path_NICE+:} false; then :
15307   $as_echo_n "(cached) " >&6
15308 else
15309   case $NICE in
15310   [\\/]* | ?:[\\/]*)
15311   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15312   ;;
15313   *)
15314   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15315 for as_dir in $PATH
15316 do
15317   IFS=$as_save_IFS
15318   test -z "$as_dir" && as_dir=.
15319     for ac_exec_ext in '' $ac_executable_extensions; do
15320   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15321     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15322     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15323     break 2
15324   fi
15325 done
15326   done
15327 IFS=$as_save_IFS
15328 
15329   ;;
15330 esac
15331 fi
15332 NICE=$ac_cv_path_NICE
15333 if test -n "$NICE"; then
15334   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15335 $as_echo "$NICE" >&6; }
15336 else
15337   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15338 $as_echo "no" >&6; }
15339 fi
15340 
15341 
15342           if test "x$NICE" = x; then
15343             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15344           fi
15345         else
15346           # Otherwise we believe it is a complete path. Use it as it is.
15347           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
15348 $as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
15349           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15350 $as_echo_n "checking for NICE... " >&6; }
15351           if test ! -x "$tool_specified"; then
15352             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15353 $as_echo "not found" >&6; }
15354             as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
15355           fi
15356           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15357 $as_echo "$tool_specified" >&6; }
15358         fi
15359       fi
15360     fi
15361 
15362   fi
15363 
15364 
15365 
15366 
15367   # Publish this variable in the help.
15368 
15369 
15370   if [ -z "${PANDOC+x}" ]; then
15371     # The variable is not set by user, try to locate tool using the code snippet
15372     for ac_prog in pandoc
15373 do
15374   # Extract the first word of "$ac_prog", so it can be a program name with args.
15375 set dummy $ac_prog; ac_word=$2
15376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15377 $as_echo_n "checking for $ac_word... " >&6; }
15378 if ${ac_cv_path_PANDOC+:} false; then :
15379   $as_echo_n "(cached) " >&6
15380 else
15381   case $PANDOC in
15382   [\\/]* | ?:[\\/]*)
15383   ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15384   ;;
15385   *)
15386   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15387 for as_dir in $PATH
15388 do
15389   IFS=$as_save_IFS
15390   test -z "$as_dir" && as_dir=.
15391     for ac_exec_ext in '' $ac_executable_extensions; do
15392   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15393     ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15394     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15395     break 2
15396   fi
15397 done
15398   done
15399 IFS=$as_save_IFS
15400 
15401   ;;
15402 esac
15403 fi
15404 PANDOC=$ac_cv_path_PANDOC
15405 if test -n "$PANDOC"; then
15406   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15407 $as_echo "$PANDOC" >&6; }
15408 else
15409   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15410 $as_echo "no" >&6; }
15411 fi
15412 
15413 
15414   test -n "$PANDOC" && break
15415 done
15416 
15417   else
15418     # The variable is set, but is it from the command line or the environment?
15419 
15420     # Try to remove the string !PANDOC! from our list.
15421     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PANDOC!/}
15422     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15423       # If it failed, the variable was not from the command line. Ignore it,
15424       # but warn the user (except for BASH, which is always set by the calling BASH).
15425       if test "xPANDOC" != xBASH; then
15426         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PANDOC from the environment. Use command line variables instead." >&5
15427 $as_echo "$as_me: WARNING: Ignoring value of PANDOC from the environment. Use command line variables instead." >&2;}
15428       fi
15429       # Try to locate tool using the code snippet
15430       for ac_prog in pandoc
15431 do
15432   # Extract the first word of "$ac_prog", so it can be a program name with args.
15433 set dummy $ac_prog; ac_word=$2
15434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15435 $as_echo_n "checking for $ac_word... " >&6; }
15436 if ${ac_cv_path_PANDOC+:} false; then :
15437   $as_echo_n "(cached) " >&6
15438 else
15439   case $PANDOC in
15440   [\\/]* | ?:[\\/]*)
15441   ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15442   ;;
15443   *)
15444   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15445 for as_dir in $PATH
15446 do
15447   IFS=$as_save_IFS
15448   test -z "$as_dir" && as_dir=.
15449     for ac_exec_ext in '' $ac_executable_extensions; do
15450   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15451     ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15452     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15453     break 2
15454   fi
15455 done
15456   done
15457 IFS=$as_save_IFS
15458 
15459   ;;
15460 esac
15461 fi
15462 PANDOC=$ac_cv_path_PANDOC
15463 if test -n "$PANDOC"; then
15464   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15465 $as_echo "$PANDOC" >&6; }
15466 else
15467   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15468 $as_echo "no" >&6; }
15469 fi
15470 
15471 
15472   test -n "$PANDOC" && break
15473 done
15474 
15475     else
15476       # If it succeeded, then it was overridden by the user. We will use it
15477       # for the tool.
15478 
15479       # First remove it from the list of overridden variables, so we can test
15480       # for unknown variables in the end.
15481       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15482 
15483       # Check if we try to supply an empty value
15484       if test "x$PANDOC" = x; then
15485         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PANDOC= (no value)" >&5
15486 $as_echo "$as_me: Setting user supplied tool PANDOC= (no value)" >&6;}
15487         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PANDOC" >&5
15488 $as_echo_n "checking for PANDOC... " >&6; }
15489         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15490 $as_echo "disabled" >&6; }
15491       else
15492         # Check if the provided tool contains a complete path.
15493         tool_specified="$PANDOC"
15494         tool_basename="${tool_specified##*/}"
15495         if test "x$tool_basename" = "x$tool_specified"; then
15496           # A command without a complete path is provided, search $PATH.
15497           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PANDOC=$tool_basename" >&5
15498 $as_echo "$as_me: Will search for user supplied tool PANDOC=$tool_basename" >&6;}
15499           # Extract the first word of "$tool_basename", so it can be a program name with args.
15500 set dummy $tool_basename; ac_word=$2
15501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15502 $as_echo_n "checking for $ac_word... " >&6; }
15503 if ${ac_cv_path_PANDOC+:} false; then :
15504   $as_echo_n "(cached) " >&6
15505 else
15506   case $PANDOC in
15507   [\\/]* | ?:[\\/]*)
15508   ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15509   ;;
15510   *)
15511   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15512 for as_dir in $PATH
15513 do
15514   IFS=$as_save_IFS
15515   test -z "$as_dir" && as_dir=.
15516     for ac_exec_ext in '' $ac_executable_extensions; do
15517   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15518     ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15519     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15520     break 2
15521   fi
15522 done
15523   done
15524 IFS=$as_save_IFS
15525 
15526   ;;
15527 esac
15528 fi
15529 PANDOC=$ac_cv_path_PANDOC
15530 if test -n "$PANDOC"; then
15531   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15532 $as_echo "$PANDOC" >&6; }
15533 else
15534   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15535 $as_echo "no" >&6; }
15536 fi
15537 
15538 
15539           if test "x$PANDOC" = x; then
15540             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15541           fi
15542         else
15543           # Otherwise we believe it is a complete path. Use it as it is.
15544           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PANDOC=$tool_specified" >&5
15545 $as_echo "$as_me: Will use user supplied tool PANDOC=$tool_specified" >&6;}
15546           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PANDOC" >&5
15547 $as_echo_n "checking for PANDOC... " >&6; }
15548           if test ! -x "$tool_specified"; then
15549             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15550 $as_echo "not found" >&6; }
15551             as_fn_error $? "User supplied tool PANDOC=$tool_specified does not exist or is not executable" "$LINENO" 5
15552           fi
15553           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15554 $as_echo "$tool_specified" >&6; }
15555         fi
15556       fi
15557     fi
15558 
15559   fi
15560 
15561 
15562 
15563 
15564 # Now we can determine OpenJDK build and target platforms. This is required to
15565 # have early on.
15566 # Make sure we can run config.sub.
15567 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15568   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
15569 
15570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
15571 $as_echo_n "checking build system type... " >&6; }
15572 if ${ac_cv_build+:} false; then :
15573   $as_echo_n "(cached) " >&6
15574 else
15575   ac_build_alias=$build_alias
15576 test "x$ac_build_alias" = x &&
15577   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15578 test "x$ac_build_alias" = x &&
15579   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
15580 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15581   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
15582 
15583 fi
15584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
15585 $as_echo "$ac_cv_build" >&6; }
15586 case $ac_cv_build in
15587 *-*-*) ;;
15588 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
15589 esac
15590 build=$ac_cv_build
15591 ac_save_IFS=$IFS; IFS='-'
15592 set x $ac_cv_build
15593 shift
15594 build_cpu=$1
15595 build_vendor=$2
15596 shift; shift
15597 # Remember, the first character of IFS is used to create $*,
15598 # except with old shells:
15599 build_os=$*
15600 IFS=$ac_save_IFS
15601 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15602 
15603 
15604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
15605 $as_echo_n "checking host system type... " >&6; }
15606 if ${ac_cv_host+:} false; then :
15607   $as_echo_n "(cached) " >&6
15608 else
15609   if test "x$host_alias" = x; then
15610   ac_cv_host=$ac_cv_build
15611 else
15612   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15613     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15614 fi
15615 
15616 fi
15617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
15618 $as_echo "$ac_cv_host" >&6; }
15619 case $ac_cv_host in
15620 *-*-*) ;;
15621 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
15622 esac
15623 host=$ac_cv_host
15624 ac_save_IFS=$IFS; IFS='-'
15625 set x $ac_cv_host
15626 shift
15627 host_cpu=$1
15628 host_vendor=$2
15629 shift; shift
15630 # Remember, the first character of IFS is used to create $*,
15631 # except with old shells:
15632 host_os=$*
15633 IFS=$ac_save_IFS
15634 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15635 
15636 
15637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
15638 $as_echo_n "checking target system type... " >&6; }
15639 if ${ac_cv_target+:} false; then :
15640   $as_echo_n "(cached) " >&6
15641 else
15642   if test "x$target_alias" = x; then
15643   ac_cv_target=$ac_cv_host
15644 else
15645   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15646     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
15647 fi
15648 
15649 fi
15650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
15651 $as_echo "$ac_cv_target" >&6; }
15652 case $ac_cv_target in
15653 *-*-*) ;;
15654 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
15655 esac
15656 target=$ac_cv_target
15657 ac_save_IFS=$IFS; IFS='-'
15658 set x $ac_cv_target
15659 shift
15660 target_cpu=$1
15661 target_vendor=$2
15662 shift; shift
15663 # Remember, the first character of IFS is used to create $*,
15664 # except with old shells:
15665 target_os=$*
15666 IFS=$ac_save_IFS
15667 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15668 
15669 
15670 # The aliases save the names the user supplied, while $host etc.
15671 # will get canonicalized.
15672 test -n "$target_alias" &&
15673   test "$program_prefix$program_suffix$program_transform_name" = \
15674     NONENONEs,x,x, &&
15675   program_prefix=${target_alias}-
15676 
15677   # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
15678   # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
15679   # product you're building. The target of this build is called "host". Since this is confusing to most people, we
15680   # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
15681   # to use the configure naming style.
15682 
15683 
15684 
15685 
15686 
15687   # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
15688   # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
15689   # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
15690   # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
15691   OPENJDK_TARGET_AUTOCONF_NAME="$host"
15692   OPENJDK_BUILD_AUTOCONF_NAME="$build"
15693 
15694 
15695 
15696   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15697 
15698   case "$build_os" in
15699     *linux*)
15700       VAR_OS=linux
15701       VAR_OS_TYPE=unix
15702       ;;
15703     *solaris*)
15704       VAR_OS=solaris
15705       VAR_OS_TYPE=unix
15706       ;;
15707     *darwin*)
15708       VAR_OS=macosx
15709       VAR_OS_TYPE=unix
15710       ;;
15711     *bsd*)
15712       VAR_OS=bsd
15713       VAR_OS_TYPE=unix
15714       ;;
15715     *cygwin*)
15716       VAR_OS=windows
15717       VAR_OS_ENV=windows.cygwin
15718       ;;
15719     *mingw*)
15720       VAR_OS=windows
15721       VAR_OS_ENV=windows.msys
15722       ;;
15723     *aix*)
15724       VAR_OS=aix
15725       VAR_OS_TYPE=unix
15726       ;;
15727     *)
15728       as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15729       ;;
15730   esac
15731 
15732 
15733   # First argument is the cpu name from the trip/quad
15734   case "$build_cpu" in
15735     x86_64)
15736       VAR_CPU=x86_64
15737       VAR_CPU_ARCH=x86
15738       VAR_CPU_BITS=64
15739       VAR_CPU_ENDIAN=little
15740       ;;
15741     i?86)
15742       VAR_CPU=x86
15743       VAR_CPU_ARCH=x86
15744       VAR_CPU_BITS=32
15745       VAR_CPU_ENDIAN=little
15746       ;;
15747     arm*)
15748       VAR_CPU=arm
15749       VAR_CPU_ARCH=arm
15750       VAR_CPU_BITS=32
15751       VAR_CPU_ENDIAN=little
15752       ;;
15753     aarch64)
15754       VAR_CPU=aarch64
15755       VAR_CPU_ARCH=aarch64
15756       VAR_CPU_BITS=64
15757       VAR_CPU_ENDIAN=little
15758       ;;
15759     powerpc)
15760       VAR_CPU=ppc
15761       VAR_CPU_ARCH=ppc
15762       VAR_CPU_BITS=32
15763       VAR_CPU_ENDIAN=big
15764       ;;
15765     powerpc64)
15766       VAR_CPU=ppc64
15767       VAR_CPU_ARCH=ppc
15768       VAR_CPU_BITS=64
15769       VAR_CPU_ENDIAN=big
15770       ;;
15771     powerpc64le)
15772       VAR_CPU=ppc64le
15773       VAR_CPU_ARCH=ppc
15774       VAR_CPU_BITS=64
15775       VAR_CPU_ENDIAN=little
15776       ;;
15777     s390)
15778       VAR_CPU=s390
15779       VAR_CPU_ARCH=s390
15780       VAR_CPU_BITS=32
15781       VAR_CPU_ENDIAN=big
15782       ;;
15783     s390x)
15784       VAR_CPU=s390x
15785       VAR_CPU_ARCH=s390
15786       VAR_CPU_BITS=64
15787       VAR_CPU_ENDIAN=big
15788       ;;
15789     sparc)
15790       VAR_CPU=sparc
15791       VAR_CPU_ARCH=sparc
15792       VAR_CPU_BITS=32
15793       VAR_CPU_ENDIAN=big
15794       ;;
15795     sparcv9|sparc64)
15796       VAR_CPU=sparcv9
15797       VAR_CPU_ARCH=sparc
15798       VAR_CPU_BITS=64
15799       VAR_CPU_ENDIAN=big
15800       ;;
15801     *)
15802       as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15803       ;;
15804   esac
15805 
15806   # ..and setup our own variables. (Do this explicitly to facilitate searching)
15807   OPENJDK_BUILD_OS="$VAR_OS"
15808   if test "x$VAR_OS_TYPE" != x; then
15809     OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15810   else
15811     OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15812   fi
15813   if test "x$VAR_OS_ENV" != x; then
15814     OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15815   else
15816     OPENJDK_BUILD_OS_ENV="$VAR_OS"
15817   fi
15818   OPENJDK_BUILD_CPU="$VAR_CPU"
15819   OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15820   OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15821   OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15822 
15823 
15824 
15825 
15826 
15827 
15828 
15829 
15830   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15831 $as_echo_n "checking openjdk-build os-cpu... " >&6; }
15832   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15833 $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15834 
15835   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15836 
15837   case "$host_os" in
15838     *linux*)
15839       VAR_OS=linux
15840       VAR_OS_TYPE=unix
15841       ;;
15842     *solaris*)
15843       VAR_OS=solaris
15844       VAR_OS_TYPE=unix
15845       ;;
15846     *darwin*)
15847       VAR_OS=macosx
15848       VAR_OS_TYPE=unix
15849       ;;
15850     *bsd*)
15851       VAR_OS=bsd
15852       VAR_OS_TYPE=unix
15853       ;;
15854     *cygwin*)
15855       VAR_OS=windows
15856       VAR_OS_ENV=windows.cygwin
15857       ;;
15858     *mingw*)
15859       VAR_OS=windows
15860       VAR_OS_ENV=windows.msys
15861       ;;
15862     *aix*)
15863       VAR_OS=aix
15864       VAR_OS_TYPE=unix
15865       ;;
15866     *)
15867       as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15868       ;;
15869   esac
15870 
15871 
15872   # First argument is the cpu name from the trip/quad
15873   case "$host_cpu" in
15874     x86_64)
15875       VAR_CPU=x86_64
15876       VAR_CPU_ARCH=x86
15877       VAR_CPU_BITS=64
15878       VAR_CPU_ENDIAN=little
15879       ;;
15880     i?86)
15881       VAR_CPU=x86
15882       VAR_CPU_ARCH=x86
15883       VAR_CPU_BITS=32
15884       VAR_CPU_ENDIAN=little
15885       ;;
15886     arm*)
15887       VAR_CPU=arm
15888       VAR_CPU_ARCH=arm
15889       VAR_CPU_BITS=32
15890       VAR_CPU_ENDIAN=little
15891       ;;
15892     aarch64)
15893       VAR_CPU=aarch64
15894       VAR_CPU_ARCH=aarch64
15895       VAR_CPU_BITS=64
15896       VAR_CPU_ENDIAN=little
15897       ;;
15898     powerpc)
15899       VAR_CPU=ppc
15900       VAR_CPU_ARCH=ppc
15901       VAR_CPU_BITS=32
15902       VAR_CPU_ENDIAN=big
15903       ;;
15904     powerpc64)
15905       VAR_CPU=ppc64
15906       VAR_CPU_ARCH=ppc
15907       VAR_CPU_BITS=64
15908       VAR_CPU_ENDIAN=big
15909       ;;
15910     powerpc64le)
15911       VAR_CPU=ppc64le
15912       VAR_CPU_ARCH=ppc
15913       VAR_CPU_BITS=64
15914       VAR_CPU_ENDIAN=little
15915       ;;
15916     s390)
15917       VAR_CPU=s390
15918       VAR_CPU_ARCH=s390
15919       VAR_CPU_BITS=32
15920       VAR_CPU_ENDIAN=big
15921       ;;
15922     s390x)
15923       VAR_CPU=s390x
15924       VAR_CPU_ARCH=s390
15925       VAR_CPU_BITS=64
15926       VAR_CPU_ENDIAN=big
15927       ;;
15928     sparc)
15929       VAR_CPU=sparc
15930       VAR_CPU_ARCH=sparc
15931       VAR_CPU_BITS=32
15932       VAR_CPU_ENDIAN=big
15933       ;;
15934     sparcv9|sparc64)
15935       VAR_CPU=sparcv9
15936       VAR_CPU_ARCH=sparc
15937       VAR_CPU_BITS=64
15938       VAR_CPU_ENDIAN=big
15939       ;;
15940     *)
15941       as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15942       ;;
15943   esac
15944 
15945   # ... and setup our own variables. (Do this explicitly to facilitate searching)
15946   OPENJDK_TARGET_OS="$VAR_OS"
15947   if test "x$VAR_OS_TYPE" != x; then
15948     OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15949   else
15950     OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15951   fi
15952   if test "x$VAR_OS_ENV" != x; then
15953     OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15954   else
15955     OPENJDK_TARGET_OS_ENV="$VAR_OS"
15956   fi
15957   OPENJDK_TARGET_CPU="$VAR_CPU"
15958   OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15959   OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15960   OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15961 
15962 
15963 
15964 
15965 
15966 
15967 
15968 
15969   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15970 $as_echo_n "checking openjdk-target os-cpu... " >&6; }
15971   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15972 $as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15973 
15974 
15975 
15976 # Check whether --with-target-bits was given.
15977 if test "${with_target_bits+set}" = set; then :
15978   withval=$with_target_bits;
15979 fi
15980 
15981 
15982   # We have three types of compiles:
15983   # native  == normal compilation, target system == build system
15984   # cross   == traditional cross compilation, target system != build system; special toolchain needed
15985   # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15986   #
15987   if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15988     # We're doing a proper cross-compilation
15989     COMPILE_TYPE="cross"
15990   else
15991     COMPILE_TYPE="native"
15992   fi
15993 
15994   if test "x$with_target_bits" != x; then
15995     if test "x$COMPILE_TYPE" = "xcross"; then
15996       as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15997     fi
15998 
15999     if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16000       # A reduced build is requested
16001       COMPILE_TYPE="reduced"
16002       OPENJDK_TARGET_CPU_BITS=32
16003       if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
16004         OPENJDK_TARGET_CPU=x86
16005       elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
16006         OPENJDK_TARGET_CPU=sparc
16007       else
16008         as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
16009       fi
16010     elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16011       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
16012     elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
16013       { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
16014 $as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
16015     else
16016       as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
16017     fi
16018   fi
16019 
16020 
16021   { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
16022 $as_echo_n "checking compilation type... " >&6; }
16023   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
16024 $as_echo "$COMPILE_TYPE" >&6; }
16025 
16026 
16027   if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
16028     REQUIRED_OS_NAME=SunOS
16029     REQUIRED_OS_VERSION=5.10
16030   fi
16031   if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
16032     REQUIRED_OS_NAME=Linux
16033     REQUIRED_OS_VERSION=2.6
16034   fi
16035   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16036     REQUIRED_OS_NAME=Windows
16037     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
16038       REQUIRED_OS_VERSION=5.2
16039     else
16040       REQUIRED_OS_VERSION=5.1
16041     fi
16042   fi
16043   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
16044     REQUIRED_OS_NAME=Darwin
16045     REQUIRED_OS_VERSION=11.2
16046   fi
16047   if test "x$OPENJDK_TARGET_OS" = "xaix"; then
16048     REQUIRED_OS_NAME=AIX
16049     REQUIRED_OS_VERSION=7.1
16050   fi
16051 
16052 
16053 
16054 
16055 
16056 
16057   # Also store the legacy naming of the cpu.
16058   # Ie i586 and amd64 instead of x86 and x86_64
16059   OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
16060   if test "x$OPENJDK_TARGET_CPU" = xx86; then
16061     OPENJDK_TARGET_CPU_LEGACY="i586"
16062   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16063     # On all platforms except MacOSX replace x86_64 with amd64.
16064     OPENJDK_TARGET_CPU_LEGACY="amd64"
16065   fi
16066 
16067 
16068   # And the second legacy naming of the cpu.
16069   # Ie i386 and amd64 instead of x86 and x86_64.
16070   OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
16071   if test "x$OPENJDK_TARGET_CPU" = xx86; then
16072     OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
16073   elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16074     OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
16075   fi
16076 
16077 
16078   # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
16079   # /amd64 or /sparcv9. This string is appended to some library paths, like this:
16080   # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
16081   OPENJDK_TARGET_CPU_ISADIR=""
16082   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
16083     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16084       OPENJDK_TARGET_CPU_ISADIR="/amd64"
16085     elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16086       OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
16087     fi
16088   fi
16089 
16090 
16091   # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
16092   OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
16093   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
16094     # On linux only, we replace x86 with i386.
16095     OPENJDK_TARGET_CPU_OSARCH="i386"
16096   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16097     # On all platforms except macosx, we replace x86_64 with amd64.
16098     OPENJDK_TARGET_CPU_OSARCH="amd64"
16099   fi
16100 
16101 
16102   OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
16103   if test "x$OPENJDK_TARGET_CPU" = xx86; then
16104     OPENJDK_TARGET_CPU_JLI="i386"
16105   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16106     # On all platforms except macosx, we replace x86_64 with amd64.
16107     OPENJDK_TARGET_CPU_JLI="amd64"
16108   fi
16109 
16110   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16111       OPENJDK_TARGET_OS_EXPORT_DIR=macosx
16112   else
16113       OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
16114   fi
16115 
16116 
16117   # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16118   # Macosx is osx and x86_64 is x64
16119   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16120     OPENJDK_TARGET_OS_BUNDLE="osx"
16121   else
16122     OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
16123   fi
16124   if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16125     OPENJDK_TARGET_CPU_BUNDLE="x64"
16126   else
16127     OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
16128   fi
16129   OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
16130 
16131 
16132   if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16133     # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16134     # unpack200.exe. This variable is used in
16135     # FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER.
16136     if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
16137       OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
16138     fi
16139   fi
16140 
16141   if test "x$COMPILE_TYPE" = "xcross"; then
16142     # FIXME: ... or should this include reduced builds..?
16143     DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
16144   else
16145     DEFINE_CROSS_COMPILE_ARCH=""
16146   fi
16147 
16148 
16149   # Convert openjdk platform names to hotspot names
16150 
16151   HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
16152   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16153     HOTSPOT_TARGET_OS=bsd
16154   fi
16155 
16156 
16157   HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
16158   if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
16159     HOTSPOT_TARGET_OS_TYPE=posix
16160   fi
16161 
16162 
16163   HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
16164   if test "x$OPENJDK_TARGET_CPU" = xx86; then
16165     HOTSPOT_TARGET_CPU=x86_32
16166   elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16167     HOTSPOT_TARGET_CPU=sparc
16168   elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
16169     HOTSPOT_TARGET_CPU=ppc_64
16170   elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
16171     HOTSPOT_TARGET_CPU=ppc_64
16172   fi
16173 
16174 
16175   # This is identical with OPENJDK_*, but define anyway for consistency.
16176   HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
16177 
16178 
16179   # Setup HOTSPOT_TARGET_CPU_DEFINE
16180   if test "x$OPENJDK_TARGET_CPU" = xx86; then
16181     HOTSPOT_TARGET_CPU_DEFINE=IA32
16182   elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16183     HOTSPOT_TARGET_CPU_DEFINE=AMD64
16184   elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16185     HOTSPOT_TARGET_CPU_DEFINE=SPARC
16186   elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
16187     HOTSPOT_TARGET_CPU_DEFINE=AARCH64
16188   elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
16189     HOTSPOT_TARGET_CPU_DEFINE=PPC64
16190   elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
16191     HOTSPOT_TARGET_CPU_DEFINE=PPC64
16192 
16193   # The cpu defines below are for zero, we don't support them directly.
16194   elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
16195     HOTSPOT_TARGET_CPU_DEFINE=SPARC
16196   elif test "x$OPENJDK_TARGET_CPU" = xppc; then
16197     HOTSPOT_TARGET_CPU_DEFINE=PPC32
16198   elif test "x$OPENJDK_TARGET_CPU" = xs390; then
16199     HOTSPOT_TARGET_CPU_DEFINE=S390
16200   elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
16201     HOTSPOT_TARGET_CPU_DEFINE=S390
16202   elif test "x$OPENJDK_TARGET_CPU" != x; then
16203     HOTSPOT_TARGET_CPU_DEFINE=$(echo $OPENJDK_TARGET_CPU | tr a-z A-Z)
16204   fi
16205 
16206 
16207 
16208 
16209   # Also store the legacy naming of the cpu.
16210   # Ie i586 and amd64 instead of x86 and x86_64
16211   OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
16212   if test "x$OPENJDK_BUILD_CPU" = xx86; then
16213     OPENJDK_BUILD_CPU_LEGACY="i586"
16214   elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16215     # On all platforms except MacOSX replace x86_64 with amd64.
16216     OPENJDK_BUILD_CPU_LEGACY="amd64"
16217   fi
16218 
16219 
16220   # And the second legacy naming of the cpu.
16221   # Ie i386 and amd64 instead of x86 and x86_64.
16222   OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
16223   if test "x$OPENJDK_BUILD_CPU" = xx86; then
16224     OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
16225   elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16226     OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
16227   fi
16228 
16229 
16230   # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
16231   # /amd64 or /sparcv9. This string is appended to some library paths, like this:
16232   # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
16233   OPENJDK_BUILD_CPU_ISADIR=""
16234   if test "x$OPENJDK_BUILD_OS" = xsolaris; then
16235     if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16236       OPENJDK_BUILD_CPU_ISADIR="/amd64"
16237     elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16238       OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
16239     fi
16240   fi
16241 
16242 
16243   # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
16244   OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
16245   if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
16246     # On linux only, we replace x86 with i386.
16247     OPENJDK_BUILD_CPU_OSARCH="i386"
16248   elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16249     # On all platforms except macosx, we replace x86_64 with amd64.
16250     OPENJDK_BUILD_CPU_OSARCH="amd64"
16251   fi
16252 
16253 
16254   OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
16255   if test "x$OPENJDK_BUILD_CPU" = xx86; then
16256     OPENJDK_BUILD_CPU_JLI="i386"
16257   elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16258     # On all platforms except macosx, we replace x86_64 with amd64.
16259     OPENJDK_BUILD_CPU_JLI="amd64"
16260   fi
16261 
16262   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16263       OPENJDK_BUILD_OS_EXPORT_DIR=macosx
16264   else
16265       OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
16266   fi
16267 
16268 
16269   # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16270   # Macosx is osx and x86_64 is x64
16271   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16272     OPENJDK_BUILD_OS_BUNDLE="osx"
16273   else
16274     OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
16275   fi
16276   if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16277     OPENJDK_BUILD_CPU_BUNDLE="x64"
16278   else
16279     OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
16280   fi
16281   OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16282 
16283 
16284   if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16285     # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16286     # unpack200.exe. This variable is used in
16287     # FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER.
16288     if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16289       OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16290     fi
16291   fi
16292 
16293   if test "x$COMPILE_TYPE" = "xcross"; then
16294     # FIXME: ... or should this include reduced builds..?
16295     DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16296   else
16297     DEFINE_CROSS_COMPILE_ARCH=""
16298   fi
16299 
16300 
16301   # Convert openjdk platform names to hotspot names
16302 
16303   HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16304   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16305     HOTSPOT_BUILD_OS=bsd
16306   fi
16307 
16308 
16309   HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16310   if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16311     HOTSPOT_BUILD_OS_TYPE=posix
16312   fi
16313 
16314 
16315   HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16316   if test "x$OPENJDK_BUILD_CPU" = xx86; then
16317     HOTSPOT_BUILD_CPU=x86_32
16318   elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16319     HOTSPOT_BUILD_CPU=sparc
16320   elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16321     HOTSPOT_BUILD_CPU=ppc_64
16322   elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16323     HOTSPOT_BUILD_CPU=ppc_64
16324   fi
16325 
16326 
16327   # This is identical with OPENJDK_*, but define anyway for consistency.
16328   HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16329 
16330 
16331   # Setup HOTSPOT_BUILD_CPU_DEFINE
16332   if test "x$OPENJDK_BUILD_CPU" = xx86; then
16333     HOTSPOT_BUILD_CPU_DEFINE=IA32
16334   elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16335     HOTSPOT_BUILD_CPU_DEFINE=AMD64
16336   elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16337     HOTSPOT_BUILD_CPU_DEFINE=SPARC
16338   elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16339     HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16340   elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16341     HOTSPOT_BUILD_CPU_DEFINE=PPC64
16342   elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16343     HOTSPOT_BUILD_CPU_DEFINE=PPC64
16344 
16345   # The cpu defines below are for zero, we don't support them directly.
16346   elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16347     HOTSPOT_BUILD_CPU_DEFINE=SPARC
16348   elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16349     HOTSPOT_BUILD_CPU_DEFINE=PPC32
16350   elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16351     HOTSPOT_BUILD_CPU_DEFINE=S390
16352   elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16353     HOTSPOT_BUILD_CPU_DEFINE=S390
16354   elif test "x$OPENJDK_BUILD_CPU" != x; then
16355     HOTSPOT_BUILD_CPU_DEFINE=$(echo $OPENJDK_BUILD_CPU | tr a-z A-Z)
16356   fi
16357 
16358 
16359 
16360 
16361 
16362 
16363 # Continue setting up basic stuff. Most remaining code require fundamental tools.
16364 
16365   # Save the current directory this script was started from
16366   CURDIR="$PWD"
16367 
16368   # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16369   # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16370   # was not available at that time.
16371   REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16372   if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16373     ORIGINAL_PATH="$REWRITTEN_PATH"
16374     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16375 $as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16376   fi
16377 
16378   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16379     PATH_SEP=";"
16380 
16381   SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16382   if test $SRC_ROOT_LENGTH -gt 100; then
16383     as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16384   fi
16385 
16386   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16387     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16388 $as_echo_n "checking cygwin release... " >&6; }
16389     CYGWIN_VERSION=`$UNAME -r`
16390     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16391 $as_echo "$CYGWIN_VERSION" >&6; }
16392     WINDOWS_ENV_VENDOR='cygwin'
16393     WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16394 
16395     CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16396     if test "x$CYGWIN_VERSION_OLD" != x; then
16397       { $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
16398 $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;}
16399       as_fn_error $? "Cannot continue" "$LINENO" 5
16400     fi
16401     if test "x$CYGPATH" = x; then
16402       as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16403     fi
16404     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16405 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16406     # The cmd output ends with Windows line endings (CR/LF)
16407     cygwin_winpath_root=`cd / ; cmd /c cd | $TR -d '\r\n'`
16408     # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16409     CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16410     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16411 $as_echo "$CYGWIN_ROOT_PATH" >&6; }
16412     WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16413     test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16414     if test "x$test_cygdrive_prefix" = x; then
16415       as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16416     fi
16417   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16418     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16419 $as_echo_n "checking msys release... " >&6; }
16420     MSYS_VERSION=`$UNAME -r`
16421     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16422 $as_echo "$MSYS_VERSION" >&6; }
16423 
16424     WINDOWS_ENV_VENDOR='msys'
16425     WINDOWS_ENV_VERSION="$MSYS_VERSION"
16426 
16427     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16428 $as_echo_n "checking msys root directory as unix-style path... " >&6; }
16429     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16430     MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
16431 
16432   windows_path="$MSYS_ROOT_PATH"
16433   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16434     unix_path=`$CYGPATH -u "$windows_path"`
16435     MSYS_ROOT_PATH="$unix_path"
16436   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16437     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16438     MSYS_ROOT_PATH="$unix_path"
16439   fi
16440 
16441     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16442 $as_echo "$MSYS_ROOT_PATH" >&6; }
16443     WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16444   else
16445     as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16446   fi
16447 
16448   # Test if windows or unix (cygwin/msys) find is first in path.
16449   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16450 $as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16451   FIND_BINARY_OUTPUT=`find --version 2>&1`
16452   if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16453     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16454 $as_echo "unix style" >&6; }
16455   elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16456     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16457 $as_echo "Windows" >&6; }
16458     { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16459 $as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16460     { $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
16461 $as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16462     as_fn_error $? "Cannot continue" "$LINENO" 5
16463   else
16464     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16465 $as_echo "unknown" >&6; }
16466     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16467 $as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16468   fi
16469 
16470   else
16471     PATH_SEP=":"
16472   fi
16473 
16474 
16475   # We get the top-level directory from the supporting wrappers.
16476   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16477 $as_echo_n "checking for top-level directory... " >&6; }
16478   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16479 $as_echo "$TOPDIR" >&6; }
16480 
16481 
16482   # Save the original version of TOPDIR for string comparisons
16483   ORIGINAL_TOPDIR="$TOPDIR"
16484 
16485 
16486   # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16487 
16488   # Only process if variable expands to non-empty
16489 
16490   if test "x$CURDIR" != x; then
16491     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16492 
16493   # Input might be given as Windows format, start by converting to
16494   # unix format.
16495   path="$CURDIR"
16496   new_path=`$CYGPATH -u "$path"`
16497 
16498   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16499   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16500   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16501   # "foo.exe" is OK but "foo" is an error.
16502   #
16503   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16504   # It is also a way to make sure we got the proper file name for the real test later on.
16505   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16506   if test "x$test_shortpath" = x; then
16507     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16508 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16509     as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16510   fi
16511 
16512   # Call helper function which possibly converts this using DOS-style short mode.
16513   # If so, the updated path is stored in $new_path.
16514 
16515   input_path="$new_path"
16516   # Check if we need to convert this using DOS-style short mode. If the path
16517   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16518   # take no chances and rewrite it.
16519   # Note: m4 eats our [], so we need to use [ and ] instead.
16520   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16521   if test "x$has_forbidden_chars" != x; then
16522     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16523     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16524     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16525     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16526       # Going to short mode and back again did indeed matter. Since short mode is
16527       # case insensitive, let's make it lowercase to improve readability.
16528       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16529       # Now convert it back to Unix-style (cygpath)
16530       input_path=`$CYGPATH -u "$shortmode_path"`
16531       new_path="$input_path"
16532     fi
16533   fi
16534 
16535   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16536   if test "x$test_cygdrive_prefix" = x; then
16537     # As a simple fix, exclude /usr/bin since it's not a real path.
16538     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16539       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16540       # a path prefixed by /cygdrive for fixpath to work.
16541       new_path="$CYGWIN_ROOT_PATH$input_path"
16542     fi
16543   fi
16544 
16545 
16546   if test "x$path" != "x$new_path"; then
16547     CURDIR="$new_path"
16548     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16549 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16550   fi
16551 
16552     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16553 
16554   path="$CURDIR"
16555   has_colon=`$ECHO $path | $GREP ^.:`
16556   new_path="$path"
16557   if test "x$has_colon" = x; then
16558     # Not in mixed or Windows style, start by that.
16559     new_path=`cmd //c echo $path`
16560   fi
16561 
16562 
16563   input_path="$new_path"
16564   # Check if we need to convert this using DOS-style short mode. If the path
16565   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16566   # take no chances and rewrite it.
16567   # Note: m4 eats our [], so we need to use [ and ] instead.
16568   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16569   if test "x$has_forbidden_chars" != x; then
16570     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16571     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16572   fi
16573 
16574 
16575   windows_path="$new_path"
16576   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16577     unix_path=`$CYGPATH -u "$windows_path"`
16578     new_path="$unix_path"
16579   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16580     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16581     new_path="$unix_path"
16582   fi
16583 
16584   if test "x$path" != "x$new_path"; then
16585     CURDIR="$new_path"
16586     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16587 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16588   fi
16589 
16590   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16591   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16592 
16593     else
16594       # We're on a unix platform. Hooray! :)
16595       path="$CURDIR"
16596       has_space=`$ECHO "$path" | $GREP " "`
16597       if test "x$has_space" != x; then
16598         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16599 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16600         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16601       fi
16602 
16603       # Use eval to expand a potential ~
16604       eval path="$path"
16605       if test ! -f "$path" && test ! -d "$path"; then
16606         as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16607       fi
16608 
16609       if test -d "$path"; then
16610         CURDIR="`cd "$path"; $THEPWDCMD -L`"
16611       else
16612         dir="`$DIRNAME "$path"`"
16613         base="`$BASENAME "$path"`"
16614         CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16615       fi
16616     fi
16617   fi
16618 
16619 
16620   # Only process if variable expands to non-empty
16621 
16622   if test "x$TOPDIR" != x; then
16623     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16624 
16625   # Input might be given as Windows format, start by converting to
16626   # unix format.
16627   path="$TOPDIR"
16628   new_path=`$CYGPATH -u "$path"`
16629 
16630   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16631   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16632   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16633   # "foo.exe" is OK but "foo" is an error.
16634   #
16635   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16636   # It is also a way to make sure we got the proper file name for the real test later on.
16637   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16638   if test "x$test_shortpath" = x; then
16639     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16640 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16641     as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
16642   fi
16643 
16644   # Call helper function which possibly converts this using DOS-style short mode.
16645   # If so, the updated path is stored in $new_path.
16646 
16647   input_path="$new_path"
16648   # Check if we need to convert this using DOS-style short mode. If the path
16649   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16650   # take no chances and rewrite it.
16651   # Note: m4 eats our [], so we need to use [ and ] instead.
16652   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16653   if test "x$has_forbidden_chars" != x; then
16654     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16655     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16656     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16657     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16658       # Going to short mode and back again did indeed matter. Since short mode is
16659       # case insensitive, let's make it lowercase to improve readability.
16660       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16661       # Now convert it back to Unix-style (cygpath)
16662       input_path=`$CYGPATH -u "$shortmode_path"`
16663       new_path="$input_path"
16664     fi
16665   fi
16666 
16667   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16668   if test "x$test_cygdrive_prefix" = x; then
16669     # As a simple fix, exclude /usr/bin since it's not a real path.
16670     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16671       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16672       # a path prefixed by /cygdrive for fixpath to work.
16673       new_path="$CYGWIN_ROOT_PATH$input_path"
16674     fi
16675   fi
16676 
16677 
16678   if test "x$path" != "x$new_path"; then
16679     TOPDIR="$new_path"
16680     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16681 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16682   fi
16683 
16684     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16685 
16686   path="$TOPDIR"
16687   has_colon=`$ECHO $path | $GREP ^.:`
16688   new_path="$path"
16689   if test "x$has_colon" = x; then
16690     # Not in mixed or Windows style, start by that.
16691     new_path=`cmd //c echo $path`
16692   fi
16693 
16694 
16695   input_path="$new_path"
16696   # Check if we need to convert this using DOS-style short mode. If the path
16697   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16698   # take no chances and rewrite it.
16699   # Note: m4 eats our [], so we need to use [ and ] instead.
16700   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16701   if test "x$has_forbidden_chars" != x; then
16702     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16703     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16704   fi
16705 
16706 
16707   windows_path="$new_path"
16708   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16709     unix_path=`$CYGPATH -u "$windows_path"`
16710     new_path="$unix_path"
16711   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16712     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16713     new_path="$unix_path"
16714   fi
16715 
16716   if test "x$path" != "x$new_path"; then
16717     TOPDIR="$new_path"
16718     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16719 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16720   fi
16721 
16722   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16723   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16724 
16725     else
16726       # We're on a unix platform. Hooray! :)
16727       path="$TOPDIR"
16728       has_space=`$ECHO "$path" | $GREP " "`
16729       if test "x$has_space" != x; then
16730         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16731 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16732         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16733       fi
16734 
16735       # Use eval to expand a potential ~
16736       eval path="$path"
16737       if test ! -f "$path" && test ! -d "$path"; then
16738         as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16739       fi
16740 
16741       if test -d "$path"; then
16742         TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16743       else
16744         dir="`$DIRNAME "$path"`"
16745         base="`$BASENAME "$path"`"
16746         TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16747       fi
16748     fi
16749   fi
16750 
16751   # SRC_ROOT is a traditional alias for TOPDIR.
16752   SRC_ROOT=$TOPDIR
16753 
16754   # Calculate a canonical version of TOPDIR for string comparisons
16755   CANONICAL_TOPDIR=$TOPDIR
16756 
16757   if test "x$OPENJDK_BUILD_OS" != xwindows; then
16758     # Follow a chain of symbolic links. Use readlink
16759     # where it exists, else fall back to horribly
16760     # complicated shell code.
16761     if test "x$READLINK_TESTED" != yes; then
16762       # On MacOSX there is a readlink tool with a different
16763       # purpose than the GNU readlink tool. Check the found readlink.
16764       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16765       if test "x$ISGNU" = x; then
16766         # A readlink that we do not know how to use.
16767         # Are there other non-GNU readlinks out there?
16768         READLINK_TESTED=yes
16769         READLINK=
16770       fi
16771     fi
16772 
16773     if test "x$READLINK" != x; then
16774       CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16775     else
16776       # Save the current directory for restoring afterwards
16777       STARTDIR=$PWD
16778       COUNTER=0
16779       sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16780       sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16781       cd $sym_link_dir
16782       # Use -P flag to resolve symlinks in directories.
16783       cd `$THEPWDCMD -P`
16784       sym_link_dir=`$THEPWDCMD -P`
16785       # Resolve file symlinks
16786       while test $COUNTER -lt 20; do
16787         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16788         if test "x$ISLINK" == x; then
16789           # This is not a symbolic link! We are done!
16790           break
16791         fi
16792         # Again resolve directory symlinks since the target of the just found
16793         # link could be in a different directory
16794         cd `$DIRNAME $ISLINK`
16795         sym_link_dir=`$THEPWDCMD -P`
16796         sym_link_file=`$BASENAME $ISLINK`
16797         let COUNTER=COUNTER+1
16798       done
16799       cd $STARTDIR
16800       CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16801     fi
16802   fi
16803 
16804 
16805 
16806   # Locate the directory of this script.
16807   AUTOCONF_DIR=$TOPDIR/common/autoconf
16808 
16809   # Setup username (for use in adhoc version strings etc)
16810   # Outer [ ] to quote m4.
16811    USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16812 
16813 
16814 
16815 # Check if it's a pure open build or if custom sources are to be used.
16816 
16817   # Check whether --enable-openjdk-only was given.
16818 if test "${enable_openjdk_only+set}" = set; then :
16819   enableval=$enable_openjdk_only;
16820 else
16821   enable_openjdk_only="no"
16822 fi
16823 
16824 
16825   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if custom source is suppressed (openjdk-only)" >&5
16826 $as_echo_n "checking if custom source is suppressed (openjdk-only)... " >&6; }
16827   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_openjdk_only" >&5
16828 $as_echo "$enable_openjdk_only" >&6; }
16829   if test "x$enable_openjdk_only" = "xyes"; then
16830     SUPPRESS_CUSTOM_EXTENSIONS="true"
16831   elif test "x$enable_openjdk_only" = "xno"; then
16832     SUPPRESS_CUSTOM_EXTENSIONS="false"
16833   else
16834     as_fn_error $? "Invalid value for --enable-openjdk-only: $enable_openjdk_only" "$LINENO" 5
16835   fi
16836 
16837   # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16838   # the IncludeCustomExtension macro.
16839 
16840 
16841 # Check whether --with-custom-make-dir was given.
16842 if test "${with_custom_make_dir+set}" = set; then :
16843   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
16844 $as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16845 fi
16846 
16847 
16848 
16849 
16850 # These are needed to be able to create a configuration name (and thus the output directory)
16851 
16852   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16853 $as_echo_n "checking which variant of the JDK to build... " >&6; }
16854 
16855 # Check whether --with-jdk-variant was given.
16856 if test "${with_jdk_variant+set}" = set; then :
16857   withval=$with_jdk_variant;
16858 fi
16859 
16860 
16861   if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16862     JDK_VARIANT="normal"
16863   else
16864     as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16865   fi
16866 
16867 
16868 
16869   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16870 $as_echo "$JDK_VARIANT" >&6; }
16871 
16872 
16873   DEBUG_LEVEL="release"
16874   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16875 $as_echo_n "checking which debug level to use... " >&6; }
16876   # Check whether --enable-debug was given.
16877 if test "${enable_debug+set}" = set; then :
16878   enableval=$enable_debug;
16879         ENABLE_DEBUG="${enableval}"
16880         DEBUG_LEVEL="fastdebug"
16881 
16882 else
16883   ENABLE_DEBUG="no"
16884 fi
16885 
16886 
16887 
16888 # Check whether --with-debug-level was given.
16889 if test "${with_debug_level+set}" = set; then :
16890   withval=$with_debug_level;
16891         DEBUG_LEVEL="${withval}"
16892         if test "x$ENABLE_DEBUG" = xyes; then
16893           as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16894         fi
16895 
16896 fi
16897 
16898   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16899 $as_echo "$DEBUG_LEVEL" >&6; }
16900 
16901   if test "x$DEBUG_LEVEL" != xrelease && \
16902       test "x$DEBUG_LEVEL" != xoptimized && \
16903       test "x$DEBUG_LEVEL" != xfastdebug && \
16904       test "x$DEBUG_LEVEL" != xslowdebug; then
16905     as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16906   fi
16907 
16908   # Translate DEBUG_LEVEL to debug level used by Hotspot
16909   HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16910   if test "x$DEBUG_LEVEL" = xrelease; then
16911     HOTSPOT_DEBUG_LEVEL="product"
16912   elif test "x$DEBUG_LEVEL" = xslowdebug; then
16913     HOTSPOT_DEBUG_LEVEL="debug"
16914   fi
16915 
16916   if test "x$DEBUG_LEVEL" = xoptimized; then
16917     # The debug level 'optimized' is a little special because it is currently only
16918     # applicable to the HotSpot build where it means to build a completely
16919     # optimized version of the VM without any debugging code (like for the
16920     # 'release' debug level which is called 'product' in the HotSpot build) but
16921     # with the exception that it can contain additional code which is otherwise
16922     # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16923     # test new and/or experimental features which are not intended for customer
16924     # shipment. Because these new features need to be tested and benchmarked in
16925     # real world scenarios, we want to build the containing JDK at the 'release'
16926     # debug level.
16927     DEBUG_LEVEL="release"
16928   fi
16929 
16930 
16931 
16932 
16933 
16934 
16935 # Check whether --with-jvm-variants was given.
16936 if test "${with_jvm_variants+set}" = set; then :
16937   withval=$with_jvm_variants;
16938 fi
16939 
16940 
16941 
16942 
16943 # Check whether --with-cpu-port was given.
16944 if test "${with_cpu_port+set}" = set; then :
16945   withval=$with_cpu_port;
16946 fi
16947 
16948 
16949   if test "x$with_cpu_port" != x; then
16950     if test "x$OPENJDK_TARGET_CPU" != xaarch64; then
16951       as_fn_error $? "--with-cpu-port only available on aarch64" "$LINENO" 5
16952     fi
16953     if test "x$with_cpu_port" != xarm64 && \
16954         test "x$with_cpu_port" != xaarch64; then
16955       as_fn_error $? "--with-cpu-port must specify arm64 or aarch64" "$LINENO" 5
16956     fi
16957     HOTSPOT_TARGET_CPU_PORT="$with_cpu_port"
16958   fi
16959 
16960 
16961   if test "x$with_jvm_variants" = x; then
16962     with_jvm_variants="server"
16963   fi
16964   JVM_VARIANTS_OPT="$with_jvm_variants"
16965 
16966   # Has the user listed more than one variant?
16967   # Additional [] needed to keep m4 from mangling shell constructs.
16968   if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16969     BUILDING_MULTIPLE_JVM_VARIANTS=true
16970   else
16971     BUILDING_MULTIPLE_JVM_VARIANTS=false
16972   fi
16973   # Replace the commas with AND for use in the build directory name.
16974   JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16975 
16976   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16977 $as_echo_n "checking which variants of the JVM to build... " >&6; }
16978   # JVM_VARIANTS is a space-separated list.
16979   # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16980   JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16981   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16982 $as_echo "$JVM_VARIANTS" >&6; }
16983 
16984   # Check that the selected variants are valid
16985 
16986   # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
16987   # Notice that the original variant failes on SLES 10 and 11
16988   NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
16989   STACK=${JVM_VARIANTS// /$'\n'}
16990   INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16991   if test "x$INVALID_VARIANTS" != x; then
16992     { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
16993 $as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
16994     as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
16995   fi
16996 
16997   # All "special" variants share the same output directory ("server")
16998   VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
16999   NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
17000   STACK=${JVM_VARIANTS// /$'\n'}
17001   INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
17002   if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
17003     as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
17004   fi
17005 
17006   # The "main" variant is the one used by other libs to link against during the
17007   # build.
17008   if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
17009     MAIN_VARIANT_PRIO_ORDER="server client minimal"
17010     for variant in $MAIN_VARIANT_PRIO_ORDER; do
17011       if   [[ " $JVM_VARIANTS " =~ " $variant " ]]  ; then
17012         JVM_VARIANT_MAIN="$variant"
17013         break
17014       fi
17015     done
17016   else
17017     JVM_VARIANT_MAIN="$JVM_VARIANTS"
17018   fi
17019 
17020 
17021 
17022 
17023 
17024   if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
17025     # zero behaves as a platform and rewrites these values. This is really weird. :(
17026     # We are guaranteed that we do not build any other variants when building zero.
17027     HOTSPOT_TARGET_CPU=zero
17028     HOTSPOT_TARGET_CPU_ARCH=zero
17029   fi
17030 
17031 
17032 # With basic setup done, call the custom early hook.
17033 
17034 
17035 # Check if we have devkits, extra paths or sysroot set.
17036 
17037 
17038 # Check whether --with-devkit was given.
17039 if test "${with_devkit+set}" = set; then :
17040   withval=$with_devkit;
17041 
17042   # Only process if variable expands to non-empty
17043 
17044   if test "x$with_devkit" != x; then
17045     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17046 
17047   # Input might be given as Windows format, start by converting to
17048   # unix format.
17049   path="$with_devkit"
17050   new_path=`$CYGPATH -u "$path"`
17051 
17052   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17053   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17054   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17055   # "foo.exe" is OK but "foo" is an error.
17056   #
17057   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17058   # It is also a way to make sure we got the proper file name for the real test later on.
17059   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17060   if test "x$test_shortpath" = x; then
17061     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
17062 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
17063     as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
17064   fi
17065 
17066   # Call helper function which possibly converts this using DOS-style short mode.
17067   # If so, the updated path is stored in $new_path.
17068 
17069   input_path="$new_path"
17070   # Check if we need to convert this using DOS-style short mode. If the path
17071   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17072   # take no chances and rewrite it.
17073   # Note: m4 eats our [], so we need to use [ and ] instead.
17074   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17075   if test "x$has_forbidden_chars" != x; then
17076     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17077     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17078     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17079     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17080       # Going to short mode and back again did indeed matter. Since short mode is
17081       # case insensitive, let's make it lowercase to improve readability.
17082       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17083       # Now convert it back to Unix-style (cygpath)
17084       input_path=`$CYGPATH -u "$shortmode_path"`
17085       new_path="$input_path"
17086     fi
17087   fi
17088 
17089   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17090   if test "x$test_cygdrive_prefix" = x; then
17091     # As a simple fix, exclude /usr/bin since it's not a real path.
17092     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17093       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17094       # a path prefixed by /cygdrive for fixpath to work.
17095       new_path="$CYGWIN_ROOT_PATH$input_path"
17096     fi
17097   fi
17098 
17099 
17100   if test "x$path" != "x$new_path"; then
17101     with_devkit="$new_path"
17102     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
17103 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
17104   fi
17105 
17106     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17107 
17108   path="$with_devkit"
17109   has_colon=`$ECHO $path | $GREP ^.:`
17110   new_path="$path"
17111   if test "x$has_colon" = x; then
17112     # Not in mixed or Windows style, start by that.
17113     new_path=`cmd //c echo $path`
17114   fi
17115 
17116 
17117   input_path="$new_path"
17118   # Check if we need to convert this using DOS-style short mode. If the path
17119   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17120   # take no chances and rewrite it.
17121   # Note: m4 eats our [], so we need to use [ and ] instead.
17122   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17123   if test "x$has_forbidden_chars" != x; then
17124     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17125     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17126   fi
17127 
17128 
17129   windows_path="$new_path"
17130   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17131     unix_path=`$CYGPATH -u "$windows_path"`
17132     new_path="$unix_path"
17133   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17134     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17135     new_path="$unix_path"
17136   fi
17137 
17138   if test "x$path" != "x$new_path"; then
17139     with_devkit="$new_path"
17140     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
17141 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
17142   fi
17143 
17144   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17145   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17146 
17147     else
17148       # We're on a unix platform. Hooray! :)
17149       path="$with_devkit"
17150       has_space=`$ECHO "$path" | $GREP " "`
17151       if test "x$has_space" != x; then
17152         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
17153 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
17154         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17155       fi
17156 
17157       # Use eval to expand a potential ~
17158       eval path="$path"
17159       if test ! -f "$path" && test ! -d "$path"; then
17160         as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
17161       fi
17162 
17163       if test -d "$path"; then
17164         with_devkit="`cd "$path"; $THEPWDCMD -L`"
17165       else
17166         dir="`$DIRNAME "$path"`"
17167         base="`$BASENAME "$path"`"
17168         with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
17169       fi
17170     fi
17171   fi
17172 
17173         DEVKIT_ROOT="$with_devkit"
17174         # Check for a meta data info file in the root of the devkit
17175         if test -f "$DEVKIT_ROOT/devkit.info"; then
17176           . $DEVKIT_ROOT/devkit.info
17177           # This potentially sets the following:
17178           # A descriptive name of the devkit
17179 
17180   if test "x$DEVKIT_NAME" = x; then
17181     eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
17182   fi
17183 
17184           # Corresponds to --with-extra-path
17185 
17186   if test "x$DEVKIT_EXTRA_PATH" = x; then
17187     eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
17188   fi
17189 
17190           # Corresponds to --with-toolchain-path
17191 
17192   if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17193     eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
17194   fi
17195 
17196           # Corresponds to --with-sysroot
17197 
17198   if test "x$DEVKIT_SYSROOT" = x; then
17199     eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
17200   fi
17201 
17202 
17203           # Identifies the Visual Studio version in the devkit
17204 
17205   if test "x$DEVKIT_VS_VERSION" = x; then
17206     eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
17207   fi
17208 
17209           # The Visual Studio include environment variable
17210 
17211   if test "x$DEVKIT_VS_INCLUDE" = x; then
17212     eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
17213   fi
17214 
17215           # The Visual Studio lib environment variable
17216 
17217   if test "x$DEVKIT_VS_LIB" = x; then
17218     eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
17219   fi
17220 
17221           # Corresponds to --with-msvcr-dll
17222 
17223   if test "x$DEVKIT_MSVCR_DLL" = x; then
17224     eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
17225   fi
17226 
17227           # Corresponds to --with-msvcp-dll
17228 
17229   if test "x$DEVKIT_MSVCP_DLL" = x; then
17230     eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
17231   fi
17232 
17233         fi
17234 
17235         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
17236 $as_echo_n "checking for devkit... " >&6; }
17237         if test "x$DEVKIT_NAME" != x; then
17238           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
17239 $as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
17240         else
17241           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
17242 $as_echo "$DEVKIT_ROOT" >&6; }
17243         fi
17244 
17245 
17246   if test "x$DEVKIT_EXTRA_PATH" != x; then
17247     if test "x$EXTRA_PATH" = x; then
17248       EXTRA_PATH="$DEVKIT_EXTRA_PATH"
17249     else
17250       EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
17251     fi
17252   fi
17253 
17254 
17255         # Fallback default of just /bin if DEVKIT_PATH is not defined
17256         if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17257           DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
17258         fi
17259 
17260   if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
17261     if test "x$TOOLCHAIN_PATH" = x; then
17262       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
17263     else
17264       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
17265     fi
17266   fi
17267 
17268 
17269         # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
17270         # places for backwards compatiblity.
17271         if test "x$DEVKIT_SYSROOT" != x; then
17272           SYSROOT="$DEVKIT_SYSROOT"
17273         elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
17274           SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
17275         elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
17276           SYSROOT="$DEVKIT_ROOT/$host/sys-root"
17277         fi
17278 
17279 
17280 fi
17281 
17282 
17283   # You can force the sysroot if the sysroot encoded into the compiler tools
17284   # is not correct.
17285 
17286 # Check whether --with-sys-root was given.
17287 if test "${with_sys_root+set}" = set; then :
17288   withval=$with_sys_root; SYSROOT=$with_sys_root
17289 
17290 fi
17291 
17292 
17293 
17294 # Check whether --with-sysroot was given.
17295 if test "${with_sysroot+set}" = set; then :
17296   withval=$with_sysroot; SYSROOT=$with_sysroot
17297 
17298 fi
17299 
17300 
17301 
17302 # Check whether --with-tools-dir was given.
17303 if test "${with_tools_dir+set}" = set; then :
17304   withval=$with_tools_dir;
17305   if test "x$with_tools_dir" != x; then
17306     if test "x$TOOLCHAIN_PATH" = x; then
17307       TOOLCHAIN_PATH="$with_tools_dir"
17308     else
17309       TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17310     fi
17311   fi
17312 
17313 
17314 fi
17315 
17316 
17317 
17318 # Check whether --with-toolchain-path was given.
17319 if test "${with_toolchain_path+set}" = set; then :
17320   withval=$with_toolchain_path;
17321   if test "x$with_toolchain_path" != x; then
17322     if test "x$TOOLCHAIN_PATH" = x; then
17323       TOOLCHAIN_PATH="$with_toolchain_path"
17324     else
17325       TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17326     fi
17327   fi
17328 
17329 
17330 fi
17331 
17332 
17333 
17334 # Check whether --with-extra-path was given.
17335 if test "${with_extra_path+set}" = set; then :
17336   withval=$with_extra_path;
17337   if test "x$with_extra_path" != x; then
17338     if test "x$EXTRA_PATH" = x; then
17339       EXTRA_PATH="$with_extra_path"
17340     else
17341       EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17342     fi
17343   fi
17344 
17345 
17346 fi
17347 
17348 
17349   if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17350     # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17351     # If not, detect if Xcode is installed by running xcodebuild -version
17352     # if no Xcode installed, xcodebuild exits with 1
17353     # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17354     if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17355       # We need to use xcodebuild in the toolchain dir provided by the user, this will
17356       # fall back on the stub binary in /usr/bin/xcodebuild
17357       # Extract the first word of "xcodebuild", so it can be a program name with args.
17358 set dummy xcodebuild; ac_word=$2
17359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17360 $as_echo_n "checking for $ac_word... " >&6; }
17361 if ${ac_cv_path_XCODEBUILD+:} false; then :
17362   $as_echo_n "(cached) " >&6
17363 else
17364   case $XCODEBUILD in
17365   [\\/]* | ?:[\\/]*)
17366   ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17367   ;;
17368   *)
17369   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17370 for as_dir in $TOOLCHAIN_PATH
17371 do
17372   IFS=$as_save_IFS
17373   test -z "$as_dir" && as_dir=.
17374     for ac_exec_ext in '' $ac_executable_extensions; do
17375   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17376     ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17377     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17378     break 2
17379   fi
17380 done
17381   done
17382 IFS=$as_save_IFS
17383 
17384   test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17385   ;;
17386 esac
17387 fi
17388 XCODEBUILD=$ac_cv_path_XCODEBUILD
17389 if test -n "$XCODEBUILD"; then
17390   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17391 $as_echo "$XCODEBUILD" >&6; }
17392 else
17393   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17394 $as_echo "no" >&6; }
17395 fi
17396 
17397 
17398     else
17399       # this should result in SYSROOT being empty, unless --with-sysroot is provided
17400       # when only the command line tools are installed there are no SDKs, so headers
17401       # are copied into the system frameworks
17402       XCODEBUILD=
17403 
17404     fi
17405 
17406     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17407 $as_echo_n "checking for sdk name... " >&6; }
17408 
17409 # Check whether --with-sdk-name was given.
17410 if test "${with_sdk_name+set}" = set; then :
17411   withval=$with_sdk_name; SDKNAME=$with_sdk_name
17412 
17413 fi
17414 
17415     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17416 $as_echo "$SDKNAME" >&6; }
17417 
17418     # if toolchain path is specified then don't rely on system headers, they may not compile
17419     HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17420     test -z "$TOOLCHAIN_PATH" && \
17421       HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17422 
17423     if test -z "$SYSROOT"; then
17424       if test -n "$XCODEBUILD"; then
17425         # if we don't have system headers, use default SDK name (last resort)
17426         if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17427           SDKNAME=${SDKNAME:-macosx}
17428         fi
17429 
17430         if test -n "$SDKNAME"; then
17431           # Call xcodebuild to determine SYSROOT
17432           SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
17433         fi
17434       else
17435         if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17436           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
17437         fi
17438       fi
17439     else
17440       # warn user if --with-sdk-name was also set
17441       if test -n "$with_sdk_name"; then
17442         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17443 $as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17444       fi
17445     fi
17446 
17447     if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17448       # If no system framework headers, then SYSROOT must be set, or we won't build
17449       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
17450     fi
17451 
17452     # Perform a basic sanity test
17453     if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17454       if test -z "$SYSROOT"; then
17455         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
17456       else
17457         as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17458       fi
17459     fi
17460 
17461     # set SDKROOT too, Xcode tools will pick it up
17462     SDKROOT="$SYSROOT"
17463 
17464   fi
17465 
17466   # Prepend the extra path to the global path
17467 
17468   if test "x$EXTRA_PATH" != x; then
17469     if test "x$PATH" = x; then
17470       PATH="$EXTRA_PATH"
17471     else
17472       PATH="$EXTRA_PATH:$PATH"
17473     fi
17474   fi
17475 
17476 
17477   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17478 $as_echo_n "checking for sysroot... " >&6; }
17479   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17480 $as_echo "$SYSROOT" >&6; }
17481   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17482 $as_echo_n "checking for toolchain path... " >&6; }
17483   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17484 $as_echo "$TOOLCHAIN_PATH" >&6; }
17485   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17486 $as_echo_n "checking for extra path... " >&6; }
17487   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17488 $as_echo "$EXTRA_PATH" >&6; }
17489 
17490 
17491 # To properly create a configuration name, we need to have the OpenJDK target
17492 # and options (variants and debug level) parsed.
17493 
17494 
17495 
17496 # Check whether --with-conf-name was given.
17497 if test "${with_conf_name+set}" = set; then :
17498   withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17499 fi
17500 
17501 
17502   # Test from where we are running configure, in or outside of src root.
17503   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17504 $as_echo_n "checking where to store configuration... " >&6; }
17505   if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
17506       || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
17507       || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
17508     # We are running configure from the src root.
17509     # Create a default ./build/target-variant-debuglevel output root.
17510     if test "x${CONF_NAME}" = x; then
17511       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17512 $as_echo "in default location" >&6; }
17513       CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17514     else
17515       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17516 $as_echo "in build directory with custom name" >&6; }
17517     fi
17518     OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
17519     $MKDIR -p "$OUTPUT_ROOT"
17520     if test ! -d "$OUTPUT_ROOT"; then
17521       as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
17522     fi
17523   else
17524     # We are running configure from outside of the src dir.
17525     # Then use the current directory as output dir!
17526     # If configuration is situated in normal build directory, just use the build
17527     # directory name as configuration name, otherwise use the complete path.
17528     if test "x${CONF_NAME}" = x; then
17529       CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
17530     fi
17531     OUTPUT_ROOT="$CURDIR"
17532     { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17533 $as_echo "in current directory" >&6; }
17534 
17535     # WARNING: This might be a bad thing to do. You need to be sure you want to
17536     # have a configuration in this directory. Do some sanity checks!
17537 
17538     if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
17539       # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17540       # other files
17541       files_present=`$LS $OUTPUT_ROOT`
17542       # Configure has already touched config.log and confdefs.h in the current dir when this check
17543       # is performed.
17544       filtered_files=`$ECHO "$files_present" \
17545           | $SED -e 's/config.log//g' \
17546               -e 's/configure.log//g' \
17547               -e 's/confdefs.h//g' \
17548               -e 's/ //g' \
17549           | $TR -d '\n'`
17550       if test "x$filtered_files" != x; then
17551         { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17552 $as_echo "$as_me: Current directory is $CURDIR." >&6;}
17553         { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17554 $as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17555         { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17556 $as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17557         { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17558 $as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17559         { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17560 $as_echo "$as_me: seriously mess up just about everything." >&6;}
17561         { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
17562 $as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
17563         { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17564 $as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17565         as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17566       fi
17567     fi
17568   fi
17569   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17570 $as_echo_n "checking what configuration name to use... " >&6; }
17571   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17572 $as_echo "$CONF_NAME" >&6; }
17573 
17574 
17575   # Only process if variable expands to non-empty
17576 
17577   if test "x$OUTPUT_ROOT" != x; then
17578     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17579 
17580   # Input might be given as Windows format, start by converting to
17581   # unix format.
17582   path="$OUTPUT_ROOT"
17583   new_path=`$CYGPATH -u "$path"`
17584 
17585   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17586   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17587   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17588   # "foo.exe" is OK but "foo" is an error.
17589   #
17590   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17591   # It is also a way to make sure we got the proper file name for the real test later on.
17592   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17593   if test "x$test_shortpath" = x; then
17594     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17595 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17596     as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
17597   fi
17598 
17599   # Call helper function which possibly converts this using DOS-style short mode.
17600   # If so, the updated path is stored in $new_path.
17601 
17602   input_path="$new_path"
17603   # Check if we need to convert this using DOS-style short mode. If the path
17604   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17605   # take no chances and rewrite it.
17606   # Note: m4 eats our [], so we need to use [ and ] instead.
17607   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17608   if test "x$has_forbidden_chars" != x; then
17609     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17610     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17611     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17612     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17613       # Going to short mode and back again did indeed matter. Since short mode is
17614       # case insensitive, let's make it lowercase to improve readability.
17615       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17616       # Now convert it back to Unix-style (cygpath)
17617       input_path=`$CYGPATH -u "$shortmode_path"`
17618       new_path="$input_path"
17619     fi
17620   fi
17621 
17622   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17623   if test "x$test_cygdrive_prefix" = x; then
17624     # As a simple fix, exclude /usr/bin since it's not a real path.
17625     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17626       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17627       # a path prefixed by /cygdrive for fixpath to work.
17628       new_path="$CYGWIN_ROOT_PATH$input_path"
17629     fi
17630   fi
17631 
17632 
17633   if test "x$path" != "x$new_path"; then
17634     OUTPUT_ROOT="$new_path"
17635     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17636 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17637   fi
17638 
17639     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17640 
17641   path="$OUTPUT_ROOT"
17642   has_colon=`$ECHO $path | $GREP ^.:`
17643   new_path="$path"
17644   if test "x$has_colon" = x; then
17645     # Not in mixed or Windows style, start by that.
17646     new_path=`cmd //c echo $path`
17647   fi
17648 
17649 
17650   input_path="$new_path"
17651   # Check if we need to convert this using DOS-style short mode. If the path
17652   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17653   # take no chances and rewrite it.
17654   # Note: m4 eats our [], so we need to use [ and ] instead.
17655   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17656   if test "x$has_forbidden_chars" != x; then
17657     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17658     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17659   fi
17660 
17661 
17662   windows_path="$new_path"
17663   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17664     unix_path=`$CYGPATH -u "$windows_path"`
17665     new_path="$unix_path"
17666   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17667     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17668     new_path="$unix_path"
17669   fi
17670 
17671   if test "x$path" != "x$new_path"; then
17672     OUTPUT_ROOT="$new_path"
17673     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17674 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17675   fi
17676 
17677   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17678   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17679 
17680     else
17681       # We're on a unix platform. Hooray! :)
17682       path="$OUTPUT_ROOT"
17683       has_space=`$ECHO "$path" | $GREP " "`
17684       if test "x$has_space" != x; then
17685         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17686 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17687         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17688       fi
17689 
17690       # Use eval to expand a potential ~
17691       eval path="$path"
17692       if test ! -f "$path" && test ! -d "$path"; then
17693         as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
17694       fi
17695 
17696       if test -d "$path"; then
17697         OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
17698       else
17699         dir="`$DIRNAME "$path"`"
17700         base="`$BASENAME "$path"`"
17701         OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
17702       fi
17703     fi
17704   fi
17705 
17706 
17707   CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17708   $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17709 
17710   SPEC="$OUTPUT_ROOT/spec.gmk"
17711 
17712 
17713 
17714 
17715 
17716   # The spec.gmk file contains all variables for the make system.
17717   ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17718 
17719   # The bootcycle-spec.gmk file contains support for boot cycle builds.
17720   ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17721 
17722   # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17723   ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17724 
17725   # The compare.sh is used to compare the build output to other builds.
17726   ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17727 
17728   # The generated Makefile knows where the spec.gmk is and where the source is.
17729   # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17730   # which will look for generated configurations
17731   ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17732 
17733 
17734 
17735 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17736 
17737   for ac_prog in apt-get yum brew port pkgutil pkgadd
17738 do
17739   # Extract the first word of "$ac_prog", so it can be a program name with args.
17740 set dummy $ac_prog; ac_word=$2
17741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17742 $as_echo_n "checking for $ac_word... " >&6; }
17743 if ${ac_cv_prog_PKGHANDLER+:} false; then :
17744   $as_echo_n "(cached) " >&6
17745 else
17746   if test -n "$PKGHANDLER"; then
17747   ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17748 else
17749 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17750 for as_dir in $PATH
17751 do
17752   IFS=$as_save_IFS
17753   test -z "$as_dir" && as_dir=.
17754     for ac_exec_ext in '' $ac_executable_extensions; do
17755   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17756     ac_cv_prog_PKGHANDLER="$ac_prog"
17757     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17758     break 2
17759   fi
17760 done
17761   done
17762 IFS=$as_save_IFS
17763 
17764 fi
17765 fi
17766 PKGHANDLER=$ac_cv_prog_PKGHANDLER
17767 if test -n "$PKGHANDLER"; then
17768   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17769 $as_echo "$PKGHANDLER" >&6; }
17770 else
17771   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17772 $as_echo "no" >&6; }
17773 fi
17774 
17775 
17776   test -n "$PKGHANDLER" && break
17777 done
17778 
17779 
17780 
17781 # Setup tools that requires more complex handling, or that is not needed by the configure script.
17782 
17783 
17784 
17785   # Publish this variable in the help.
17786 
17787 
17788   if [ -z "${MAKE+x}" ]; then
17789     # The variable is not set by user, try to locate tool using the code snippet
17790 
17791     # Try our hardest to locate a correct version of GNU make
17792     for ac_prog in gmake
17793 do
17794   # Extract the first word of "$ac_prog", so it can be a program name with args.
17795 set dummy $ac_prog; ac_word=$2
17796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17797 $as_echo_n "checking for $ac_word... " >&6; }
17798 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17799   $as_echo_n "(cached) " >&6
17800 else
17801   case $CHECK_GMAKE in
17802   [\\/]* | ?:[\\/]*)
17803   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17804   ;;
17805   *)
17806   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17807 for as_dir in $PATH
17808 do
17809   IFS=$as_save_IFS
17810   test -z "$as_dir" && as_dir=.
17811     for ac_exec_ext in '' $ac_executable_extensions; do
17812   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17813     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17814     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17815     break 2
17816   fi
17817 done
17818   done
17819 IFS=$as_save_IFS
17820 
17821   ;;
17822 esac
17823 fi
17824 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17825 if test -n "$CHECK_GMAKE"; then
17826   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17827 $as_echo "$CHECK_GMAKE" >&6; }
17828 else
17829   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17830 $as_echo "no" >&6; }
17831 fi
17832 
17833 
17834   test -n "$CHECK_GMAKE" && break
17835 done
17836 
17837 
17838   MAKE_CANDIDATE=""$CHECK_GMAKE""
17839   DESCRIPTION="gmake in PATH"
17840 
17841   # On Cygwin, we require a newer version of make than on other platforms
17842   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17843     MAKE_VERSION_EXPR="-e 4\."
17844     MAKE_REQUIRED_VERSION="4.0"
17845    else
17846     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17847     MAKE_REQUIRED_VERSION="3.81"
17848   fi
17849 
17850   if test "x$MAKE_CANDIDATE" != x; then
17851     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17852 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17853     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17854     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17855     if test "x$IS_GNU_MAKE" = x; then
17856       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17857 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17858     else
17859       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17860       if test "x$IS_MODERN_MAKE" = x; then
17861         { $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
17862 $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;}
17863       else
17864         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17865           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17866             MAKE_EXPECTED_ENV='cygwin'
17867           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17868             MAKE_EXPECTED_ENV='msys'
17869           else
17870             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17871           fi
17872           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17873           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17874         else
17875           # Not relevant for non-Windows
17876           IS_MAKE_CORRECT_ENV=true
17877         fi
17878         if test "x$IS_MAKE_CORRECT_ENV" = x; then
17879           { $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
17880 $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;}
17881         else
17882           FOUND_MAKE=$MAKE_CANDIDATE
17883 
17884   # Only process if variable expands to non-empty
17885 
17886   if test "x$FOUND_MAKE" != x; then
17887     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17888 
17889   # First separate the path from the arguments. This will split at the first
17890   # space.
17891   complete="$FOUND_MAKE"
17892   path="${complete%% *}"
17893   tmp="$complete EOL"
17894   arguments="${tmp#* }"
17895 
17896   # Input might be given as Windows format, start by converting to
17897   # unix format.
17898   new_path=`$CYGPATH -u "$path"`
17899 
17900   # Now try to locate executable using which
17901   new_path=`$WHICH "$new_path" 2> /dev/null`
17902   # bat and cmd files are not always considered executable in cygwin causing which
17903   # to not find them
17904   if test "x$new_path" = x \
17905       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17906       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17907     new_path=`$CYGPATH -u "$path"`
17908   fi
17909   if test "x$new_path" = x; then
17910     # Oops. Which didn't find the executable.
17911     # The splitting of arguments from the executable at a space might have been incorrect,
17912     # since paths with space are more likely in Windows. Give it another try with the whole
17913     # argument.
17914     path="$complete"
17915     arguments="EOL"
17916     new_path=`$CYGPATH -u "$path"`
17917     new_path=`$WHICH "$new_path" 2> /dev/null`
17918     # bat and cmd files are not always considered executable in cygwin causing which
17919     # to not find them
17920     if test "x$new_path" = x \
17921         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17922         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17923       new_path=`$CYGPATH -u "$path"`
17924     fi
17925     if test "x$new_path" = x; then
17926       # It's still not found. Now this is an unrecoverable error.
17927       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17928 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17929       has_space=`$ECHO "$complete" | $GREP " "`
17930       if test "x$has_space" != x; then
17931         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17932 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17933       fi
17934       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17935     fi
17936   fi
17937 
17938   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17939   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17940   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17941   # "foo.exe" is OK but "foo" is an error.
17942   #
17943   # This test is therefore slightly more accurate than "test -f" to check for file presence.
17944   # It is also a way to make sure we got the proper file name for the real test later on.
17945   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17946   if test "x$test_shortpath" = x; then
17947     # Short path failed, file does not exist as specified.
17948     # Try adding .exe or .cmd
17949     if test -f "${new_path}.exe"; then
17950       input_to_shortpath="${new_path}.exe"
17951     elif test -f "${new_path}.cmd"; then
17952       input_to_shortpath="${new_path}.cmd"
17953     else
17954       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17955 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17956       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17957 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17958       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17959     fi
17960   else
17961     input_to_shortpath="$new_path"
17962   fi
17963 
17964   # Call helper function which possibly converts this using DOS-style short mode.
17965   # If so, the updated path is stored in $new_path.
17966   new_path="$input_to_shortpath"
17967 
17968   input_path="$input_to_shortpath"
17969   # Check if we need to convert this using DOS-style short mode. If the path
17970   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17971   # take no chances and rewrite it.
17972   # Note: m4 eats our [], so we need to use [ and ] instead.
17973   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17974   if test "x$has_forbidden_chars" != x; then
17975     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17976     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17977     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17978     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17979       # Going to short mode and back again did indeed matter. Since short mode is
17980       # case insensitive, let's make it lowercase to improve readability.
17981       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17982       # Now convert it back to Unix-style (cygpath)
17983       input_path=`$CYGPATH -u "$shortmode_path"`
17984       new_path="$input_path"
17985     fi
17986   fi
17987 
17988   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17989   if test "x$test_cygdrive_prefix" = x; then
17990     # As a simple fix, exclude /usr/bin since it's not a real path.
17991     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17992       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17993       # a path prefixed by /cygdrive for fixpath to work.
17994       new_path="$CYGWIN_ROOT_PATH$input_path"
17995     fi
17996   fi
17997 
17998   # remove trailing .exe if any
17999   new_path="${new_path/%.exe/}"
18000 
18001     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18002 
18003   # First separate the path from the arguments. This will split at the first
18004   # space.
18005   complete="$FOUND_MAKE"
18006   path="${complete%% *}"
18007   tmp="$complete EOL"
18008   arguments="${tmp#* }"
18009 
18010   # Input might be given as Windows format, start by converting to
18011   # unix format.
18012   new_path="$path"
18013 
18014   windows_path="$new_path"
18015   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18016     unix_path=`$CYGPATH -u "$windows_path"`
18017     new_path="$unix_path"
18018   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18019     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18020     new_path="$unix_path"
18021   fi
18022 
18023 
18024   # Now try to locate executable using which
18025   new_path=`$WHICH "$new_path" 2> /dev/null`
18026 
18027   if test "x$new_path" = x; then
18028     # Oops. Which didn't find the executable.
18029     # The splitting of arguments from the executable at a space might have been incorrect,
18030     # since paths with space are more likely in Windows. Give it another try with the whole
18031     # argument.
18032     path="$complete"
18033     arguments="EOL"
18034     new_path="$path"
18035 
18036   windows_path="$new_path"
18037   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18038     unix_path=`$CYGPATH -u "$windows_path"`
18039     new_path="$unix_path"
18040   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18041     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18042     new_path="$unix_path"
18043   fi
18044 
18045 
18046     new_path=`$WHICH "$new_path" 2> /dev/null`
18047     # bat and cmd files are not always considered executable in MSYS causing which
18048     # to not find them
18049     if test "x$new_path" = x \
18050         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18051         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18052       new_path="$path"
18053 
18054   windows_path="$new_path"
18055   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18056     unix_path=`$CYGPATH -u "$windows_path"`
18057     new_path="$unix_path"
18058   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18059     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18060     new_path="$unix_path"
18061   fi
18062 
18063     fi
18064 
18065     if test "x$new_path" = x; then
18066       # It's still not found. Now this is an unrecoverable error.
18067       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18068 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18069       has_space=`$ECHO "$complete" | $GREP " "`
18070       if test "x$has_space" != x; then
18071         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18072 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18073       fi
18074       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18075     fi
18076   fi
18077 
18078   # Now new_path has a complete unix path to the binary
18079   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18080     # Keep paths in /bin as-is, but remove trailing .exe if any
18081     new_path="${new_path/%.exe/}"
18082     # Do not save /bin paths to all_fixpath_prefixes!
18083   else
18084     # Not in mixed or Windows style, start by that.
18085     new_path=`cmd //c echo $new_path`
18086 
18087   input_path="$new_path"
18088   # Check if we need to convert this using DOS-style short mode. If the path
18089   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18090   # take no chances and rewrite it.
18091   # Note: m4 eats our [], so we need to use [ and ] instead.
18092   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18093   if test "x$has_forbidden_chars" != x; then
18094     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18095     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18096   fi
18097 
18098     # Output is in $new_path
18099 
18100   windows_path="$new_path"
18101   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18102     unix_path=`$CYGPATH -u "$windows_path"`
18103     new_path="$unix_path"
18104   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18105     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18106     new_path="$unix_path"
18107   fi
18108 
18109     # remove trailing .exe if any
18110     new_path="${new_path/%.exe/}"
18111 
18112     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18113     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18114   fi
18115 
18116     else
18117       # We're on a unix platform. Hooray! :)
18118       # First separate the path from the arguments. This will split at the first
18119       # space.
18120       complete="$FOUND_MAKE"
18121       path="${complete%% *}"
18122       tmp="$complete EOL"
18123       arguments="${tmp#* }"
18124 
18125       # Cannot rely on the command "which" here since it doesn't always work.
18126       is_absolute_path=`$ECHO "$path" | $GREP ^/`
18127       if test -z "$is_absolute_path"; then
18128         # Path to executable is not absolute. Find it.
18129         IFS_save="$IFS"
18130         IFS=:
18131         for p in $PATH; do
18132           if test -f "$p/$path" && test -x "$p/$path"; then
18133             new_path="$p/$path"
18134             break
18135           fi
18136         done
18137         IFS="$IFS_save"
18138       else
18139         # This is an absolute path, we can use it without further modifications.
18140         new_path="$path"
18141       fi
18142 
18143       if test "x$new_path" = x; then
18144         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18145 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18146         has_space=`$ECHO "$complete" | $GREP " "`
18147         if test "x$has_space" != x; then
18148           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18149 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18150         fi
18151         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18152       fi
18153     fi
18154 
18155     # Now join together the path and the arguments once again
18156     if test "x$arguments" != xEOL; then
18157       new_complete="$new_path ${arguments% *}"
18158     else
18159       new_complete="$new_path"
18160     fi
18161 
18162     if test "x$complete" != "x$new_complete"; then
18163       FOUND_MAKE="$new_complete"
18164       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18165 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18166     fi
18167   fi
18168 
18169         fi
18170       fi
18171     fi
18172   fi
18173 
18174 
18175     if test "x$FOUND_MAKE" = x; then
18176       for ac_prog in make
18177 do
18178   # Extract the first word of "$ac_prog", so it can be a program name with args.
18179 set dummy $ac_prog; ac_word=$2
18180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18181 $as_echo_n "checking for $ac_word... " >&6; }
18182 if ${ac_cv_path_CHECK_MAKE+:} false; then :
18183   $as_echo_n "(cached) " >&6
18184 else
18185   case $CHECK_MAKE in
18186   [\\/]* | ?:[\\/]*)
18187   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
18188   ;;
18189   *)
18190   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18191 for as_dir in $PATH
18192 do
18193   IFS=$as_save_IFS
18194   test -z "$as_dir" && as_dir=.
18195     for ac_exec_ext in '' $ac_executable_extensions; do
18196   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18197     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
18198     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18199     break 2
18200   fi
18201 done
18202   done
18203 IFS=$as_save_IFS
18204 
18205   ;;
18206 esac
18207 fi
18208 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18209 if test -n "$CHECK_MAKE"; then
18210   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18211 $as_echo "$CHECK_MAKE" >&6; }
18212 else
18213   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18214 $as_echo "no" >&6; }
18215 fi
18216 
18217 
18218   test -n "$CHECK_MAKE" && break
18219 done
18220 
18221 
18222   MAKE_CANDIDATE=""$CHECK_MAKE""
18223   DESCRIPTION="make in PATH"
18224 
18225   # On Cygwin, we require a newer version of make than on other platforms
18226   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18227     MAKE_VERSION_EXPR="-e 4\."
18228     MAKE_REQUIRED_VERSION="4.0"
18229    else
18230     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18231     MAKE_REQUIRED_VERSION="3.81"
18232   fi
18233 
18234   if test "x$MAKE_CANDIDATE" != x; then
18235     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18236 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18237     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18238     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18239     if test "x$IS_GNU_MAKE" = x; then
18240       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18241 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18242     else
18243       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18244       if test "x$IS_MODERN_MAKE" = x; then
18245         { $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
18246 $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;}
18247       else
18248         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18249           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18250             MAKE_EXPECTED_ENV='cygwin'
18251           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18252             MAKE_EXPECTED_ENV='msys'
18253           else
18254             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18255           fi
18256           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18257           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18258         else
18259           # Not relevant for non-Windows
18260           IS_MAKE_CORRECT_ENV=true
18261         fi
18262         if test "x$IS_MAKE_CORRECT_ENV" = x; then
18263           { $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
18264 $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;}
18265         else
18266           FOUND_MAKE=$MAKE_CANDIDATE
18267 
18268   # Only process if variable expands to non-empty
18269 
18270   if test "x$FOUND_MAKE" != x; then
18271     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18272 
18273   # First separate the path from the arguments. This will split at the first
18274   # space.
18275   complete="$FOUND_MAKE"
18276   path="${complete%% *}"
18277   tmp="$complete EOL"
18278   arguments="${tmp#* }"
18279 
18280   # Input might be given as Windows format, start by converting to
18281   # unix format.
18282   new_path=`$CYGPATH -u "$path"`
18283 
18284   # Now try to locate executable using which
18285   new_path=`$WHICH "$new_path" 2> /dev/null`
18286   # bat and cmd files are not always considered executable in cygwin causing which
18287   # to not find them
18288   if test "x$new_path" = x \
18289       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18290       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18291     new_path=`$CYGPATH -u "$path"`
18292   fi
18293   if test "x$new_path" = x; then
18294     # Oops. Which didn't find the executable.
18295     # The splitting of arguments from the executable at a space might have been incorrect,
18296     # since paths with space are more likely in Windows. Give it another try with the whole
18297     # argument.
18298     path="$complete"
18299     arguments="EOL"
18300     new_path=`$CYGPATH -u "$path"`
18301     new_path=`$WHICH "$new_path" 2> /dev/null`
18302     # bat and cmd files are not always considered executable in cygwin causing which
18303     # to not find them
18304     if test "x$new_path" = x \
18305         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18306         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18307       new_path=`$CYGPATH -u "$path"`
18308     fi
18309     if test "x$new_path" = x; then
18310       # It's still not found. Now this is an unrecoverable error.
18311       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18312 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18313       has_space=`$ECHO "$complete" | $GREP " "`
18314       if test "x$has_space" != x; then
18315         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18316 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18317       fi
18318       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18319     fi
18320   fi
18321 
18322   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18323   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18324   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18325   # "foo.exe" is OK but "foo" is an error.
18326   #
18327   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18328   # It is also a way to make sure we got the proper file name for the real test later on.
18329   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18330   if test "x$test_shortpath" = x; then
18331     # Short path failed, file does not exist as specified.
18332     # Try adding .exe or .cmd
18333     if test -f "${new_path}.exe"; then
18334       input_to_shortpath="${new_path}.exe"
18335     elif test -f "${new_path}.cmd"; then
18336       input_to_shortpath="${new_path}.cmd"
18337     else
18338       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18339 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18340       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18341 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18342       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18343     fi
18344   else
18345     input_to_shortpath="$new_path"
18346   fi
18347 
18348   # Call helper function which possibly converts this using DOS-style short mode.
18349   # If so, the updated path is stored in $new_path.
18350   new_path="$input_to_shortpath"
18351 
18352   input_path="$input_to_shortpath"
18353   # Check if we need to convert this using DOS-style short mode. If the path
18354   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18355   # take no chances and rewrite it.
18356   # Note: m4 eats our [], so we need to use [ and ] instead.
18357   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18358   if test "x$has_forbidden_chars" != x; then
18359     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18360     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18361     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18362     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18363       # Going to short mode and back again did indeed matter. Since short mode is
18364       # case insensitive, let's make it lowercase to improve readability.
18365       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18366       # Now convert it back to Unix-style (cygpath)
18367       input_path=`$CYGPATH -u "$shortmode_path"`
18368       new_path="$input_path"
18369     fi
18370   fi
18371 
18372   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18373   if test "x$test_cygdrive_prefix" = x; then
18374     # As a simple fix, exclude /usr/bin since it's not a real path.
18375     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18376       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18377       # a path prefixed by /cygdrive for fixpath to work.
18378       new_path="$CYGWIN_ROOT_PATH$input_path"
18379     fi
18380   fi
18381 
18382   # remove trailing .exe if any
18383   new_path="${new_path/%.exe/}"
18384 
18385     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18386 
18387   # First separate the path from the arguments. This will split at the first
18388   # space.
18389   complete="$FOUND_MAKE"
18390   path="${complete%% *}"
18391   tmp="$complete EOL"
18392   arguments="${tmp#* }"
18393 
18394   # Input might be given as Windows format, start by converting to
18395   # unix format.
18396   new_path="$path"
18397 
18398   windows_path="$new_path"
18399   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18400     unix_path=`$CYGPATH -u "$windows_path"`
18401     new_path="$unix_path"
18402   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18403     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18404     new_path="$unix_path"
18405   fi
18406 
18407 
18408   # Now try to locate executable using which
18409   new_path=`$WHICH "$new_path" 2> /dev/null`
18410 
18411   if test "x$new_path" = x; then
18412     # Oops. Which didn't find the executable.
18413     # The splitting of arguments from the executable at a space might have been incorrect,
18414     # since paths with space are more likely in Windows. Give it another try with the whole
18415     # argument.
18416     path="$complete"
18417     arguments="EOL"
18418     new_path="$path"
18419 
18420   windows_path="$new_path"
18421   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18422     unix_path=`$CYGPATH -u "$windows_path"`
18423     new_path="$unix_path"
18424   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18425     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18426     new_path="$unix_path"
18427   fi
18428 
18429 
18430     new_path=`$WHICH "$new_path" 2> /dev/null`
18431     # bat and cmd files are not always considered executable in MSYS causing which
18432     # to not find them
18433     if test "x$new_path" = x \
18434         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18435         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18436       new_path="$path"
18437 
18438   windows_path="$new_path"
18439   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18440     unix_path=`$CYGPATH -u "$windows_path"`
18441     new_path="$unix_path"
18442   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18443     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18444     new_path="$unix_path"
18445   fi
18446 
18447     fi
18448 
18449     if test "x$new_path" = x; then
18450       # It's still not found. Now this is an unrecoverable error.
18451       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18452 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18453       has_space=`$ECHO "$complete" | $GREP " "`
18454       if test "x$has_space" != x; then
18455         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18456 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18457       fi
18458       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18459     fi
18460   fi
18461 
18462   # Now new_path has a complete unix path to the binary
18463   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18464     # Keep paths in /bin as-is, but remove trailing .exe if any
18465     new_path="${new_path/%.exe/}"
18466     # Do not save /bin paths to all_fixpath_prefixes!
18467   else
18468     # Not in mixed or Windows style, start by that.
18469     new_path=`cmd //c echo $new_path`
18470 
18471   input_path="$new_path"
18472   # Check if we need to convert this using DOS-style short mode. If the path
18473   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18474   # take no chances and rewrite it.
18475   # Note: m4 eats our [], so we need to use [ and ] instead.
18476   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18477   if test "x$has_forbidden_chars" != x; then
18478     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18479     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18480   fi
18481 
18482     # Output is in $new_path
18483 
18484   windows_path="$new_path"
18485   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18486     unix_path=`$CYGPATH -u "$windows_path"`
18487     new_path="$unix_path"
18488   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18489     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18490     new_path="$unix_path"
18491   fi
18492 
18493     # remove trailing .exe if any
18494     new_path="${new_path/%.exe/}"
18495 
18496     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18497     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18498   fi
18499 
18500     else
18501       # We're on a unix platform. Hooray! :)
18502       # First separate the path from the arguments. This will split at the first
18503       # space.
18504       complete="$FOUND_MAKE"
18505       path="${complete%% *}"
18506       tmp="$complete EOL"
18507       arguments="${tmp#* }"
18508 
18509       # Cannot rely on the command "which" here since it doesn't always work.
18510       is_absolute_path=`$ECHO "$path" | $GREP ^/`
18511       if test -z "$is_absolute_path"; then
18512         # Path to executable is not absolute. Find it.
18513         IFS_save="$IFS"
18514         IFS=:
18515         for p in $PATH; do
18516           if test -f "$p/$path" && test -x "$p/$path"; then
18517             new_path="$p/$path"
18518             break
18519           fi
18520         done
18521         IFS="$IFS_save"
18522       else
18523         # This is an absolute path, we can use it without further modifications.
18524         new_path="$path"
18525       fi
18526 
18527       if test "x$new_path" = x; then
18528         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18529 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18530         has_space=`$ECHO "$complete" | $GREP " "`
18531         if test "x$has_space" != x; then
18532           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18533 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18534         fi
18535         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18536       fi
18537     fi
18538 
18539     # Now join together the path and the arguments once again
18540     if test "x$arguments" != xEOL; then
18541       new_complete="$new_path ${arguments% *}"
18542     else
18543       new_complete="$new_path"
18544     fi
18545 
18546     if test "x$complete" != "x$new_complete"; then
18547       FOUND_MAKE="$new_complete"
18548       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18549 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18550     fi
18551   fi
18552 
18553         fi
18554       fi
18555     fi
18556   fi
18557 
18558     fi
18559 
18560     if test "x$FOUND_MAKE" = x; then
18561       if test "x$TOOLCHAIN_PATH" != x; then
18562         # We have a toolchain path, check that as well before giving up.
18563         OLD_PATH=$PATH
18564         PATH=$TOOLCHAIN_PATH:$PATH
18565         for ac_prog in gmake
18566 do
18567   # Extract the first word of "$ac_prog", so it can be a program name with args.
18568 set dummy $ac_prog; ac_word=$2
18569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18570 $as_echo_n "checking for $ac_word... " >&6; }
18571 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18572   $as_echo_n "(cached) " >&6
18573 else
18574   case $CHECK_TOOLSDIR_GMAKE in
18575   [\\/]* | ?:[\\/]*)
18576   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18577   ;;
18578   *)
18579   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18580 for as_dir in $PATH
18581 do
18582   IFS=$as_save_IFS
18583   test -z "$as_dir" && as_dir=.
18584     for ac_exec_ext in '' $ac_executable_extensions; do
18585   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18586     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18587     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18588     break 2
18589   fi
18590 done
18591   done
18592 IFS=$as_save_IFS
18593 
18594   ;;
18595 esac
18596 fi
18597 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18598 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18599   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18600 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18601 else
18602   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18603 $as_echo "no" >&6; }
18604 fi
18605 
18606 
18607   test -n "$CHECK_TOOLSDIR_GMAKE" && break
18608 done
18609 
18610 
18611   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18612   DESCRIPTION="gmake in tools-dir"
18613 
18614   # On Cygwin, we require a newer version of make than on other platforms
18615   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18616     MAKE_VERSION_EXPR="-e 4\."
18617     MAKE_REQUIRED_VERSION="4.0"
18618    else
18619     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18620     MAKE_REQUIRED_VERSION="3.81"
18621   fi
18622 
18623   if test "x$MAKE_CANDIDATE" != x; then
18624     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18625 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18626     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18627     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18628     if test "x$IS_GNU_MAKE" = x; then
18629       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18630 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18631     else
18632       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18633       if test "x$IS_MODERN_MAKE" = x; then
18634         { $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
18635 $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;}
18636       else
18637         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18638           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18639             MAKE_EXPECTED_ENV='cygwin'
18640           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18641             MAKE_EXPECTED_ENV='msys'
18642           else
18643             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18644           fi
18645           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18646           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18647         else
18648           # Not relevant for non-Windows
18649           IS_MAKE_CORRECT_ENV=true
18650         fi
18651         if test "x$IS_MAKE_CORRECT_ENV" = x; then
18652           { $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
18653 $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;}
18654         else
18655           FOUND_MAKE=$MAKE_CANDIDATE
18656 
18657   # Only process if variable expands to non-empty
18658 
18659   if test "x$FOUND_MAKE" != x; then
18660     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18661 
18662   # First separate the path from the arguments. This will split at the first
18663   # space.
18664   complete="$FOUND_MAKE"
18665   path="${complete%% *}"
18666   tmp="$complete EOL"
18667   arguments="${tmp#* }"
18668 
18669   # Input might be given as Windows format, start by converting to
18670   # unix format.
18671   new_path=`$CYGPATH -u "$path"`
18672 
18673   # Now try to locate executable using which
18674   new_path=`$WHICH "$new_path" 2> /dev/null`
18675   # bat and cmd files are not always considered executable in cygwin causing which
18676   # to not find them
18677   if test "x$new_path" = x \
18678       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18679       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18680     new_path=`$CYGPATH -u "$path"`
18681   fi
18682   if test "x$new_path" = x; then
18683     # Oops. Which didn't find the executable.
18684     # The splitting of arguments from the executable at a space might have been incorrect,
18685     # since paths with space are more likely in Windows. Give it another try with the whole
18686     # argument.
18687     path="$complete"
18688     arguments="EOL"
18689     new_path=`$CYGPATH -u "$path"`
18690     new_path=`$WHICH "$new_path" 2> /dev/null`
18691     # bat and cmd files are not always considered executable in cygwin causing which
18692     # to not find them
18693     if test "x$new_path" = x \
18694         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18695         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18696       new_path=`$CYGPATH -u "$path"`
18697     fi
18698     if test "x$new_path" = x; then
18699       # It's still not found. Now this is an unrecoverable error.
18700       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18701 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18702       has_space=`$ECHO "$complete" | $GREP " "`
18703       if test "x$has_space" != x; then
18704         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18705 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18706       fi
18707       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18708     fi
18709   fi
18710 
18711   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18712   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18713   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18714   # "foo.exe" is OK but "foo" is an error.
18715   #
18716   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18717   # It is also a way to make sure we got the proper file name for the real test later on.
18718   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18719   if test "x$test_shortpath" = x; then
18720     # Short path failed, file does not exist as specified.
18721     # Try adding .exe or .cmd
18722     if test -f "${new_path}.exe"; then
18723       input_to_shortpath="${new_path}.exe"
18724     elif test -f "${new_path}.cmd"; then
18725       input_to_shortpath="${new_path}.cmd"
18726     else
18727       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18728 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18729       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18730 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18731       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18732     fi
18733   else
18734     input_to_shortpath="$new_path"
18735   fi
18736 
18737   # Call helper function which possibly converts this using DOS-style short mode.
18738   # If so, the updated path is stored in $new_path.
18739   new_path="$input_to_shortpath"
18740 
18741   input_path="$input_to_shortpath"
18742   # Check if we need to convert this using DOS-style short mode. If the path
18743   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18744   # take no chances and rewrite it.
18745   # Note: m4 eats our [], so we need to use [ and ] instead.
18746   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18747   if test "x$has_forbidden_chars" != x; then
18748     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18749     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18750     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18751     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18752       # Going to short mode and back again did indeed matter. Since short mode is
18753       # case insensitive, let's make it lowercase to improve readability.
18754       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18755       # Now convert it back to Unix-style (cygpath)
18756       input_path=`$CYGPATH -u "$shortmode_path"`
18757       new_path="$input_path"
18758     fi
18759   fi
18760 
18761   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18762   if test "x$test_cygdrive_prefix" = x; then
18763     # As a simple fix, exclude /usr/bin since it's not a real path.
18764     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18765       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18766       # a path prefixed by /cygdrive for fixpath to work.
18767       new_path="$CYGWIN_ROOT_PATH$input_path"
18768     fi
18769   fi
18770 
18771   # remove trailing .exe if any
18772   new_path="${new_path/%.exe/}"
18773 
18774     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18775 
18776   # First separate the path from the arguments. This will split at the first
18777   # space.
18778   complete="$FOUND_MAKE"
18779   path="${complete%% *}"
18780   tmp="$complete EOL"
18781   arguments="${tmp#* }"
18782 
18783   # Input might be given as Windows format, start by converting to
18784   # unix format.
18785   new_path="$path"
18786 
18787   windows_path="$new_path"
18788   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18789     unix_path=`$CYGPATH -u "$windows_path"`
18790     new_path="$unix_path"
18791   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18792     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18793     new_path="$unix_path"
18794   fi
18795 
18796 
18797   # Now try to locate executable using which
18798   new_path=`$WHICH "$new_path" 2> /dev/null`
18799 
18800   if test "x$new_path" = x; then
18801     # Oops. Which didn't find the executable.
18802     # The splitting of arguments from the executable at a space might have been incorrect,
18803     # since paths with space are more likely in Windows. Give it another try with the whole
18804     # argument.
18805     path="$complete"
18806     arguments="EOL"
18807     new_path="$path"
18808 
18809   windows_path="$new_path"
18810   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18811     unix_path=`$CYGPATH -u "$windows_path"`
18812     new_path="$unix_path"
18813   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18814     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18815     new_path="$unix_path"
18816   fi
18817 
18818 
18819     new_path=`$WHICH "$new_path" 2> /dev/null`
18820     # bat and cmd files are not always considered executable in MSYS causing which
18821     # to not find them
18822     if test "x$new_path" = x \
18823         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18824         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18825       new_path="$path"
18826 
18827   windows_path="$new_path"
18828   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18829     unix_path=`$CYGPATH -u "$windows_path"`
18830     new_path="$unix_path"
18831   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18832     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18833     new_path="$unix_path"
18834   fi
18835 
18836     fi
18837 
18838     if test "x$new_path" = x; then
18839       # It's still not found. Now this is an unrecoverable error.
18840       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18841 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18842       has_space=`$ECHO "$complete" | $GREP " "`
18843       if test "x$has_space" != x; then
18844         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18845 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18846       fi
18847       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18848     fi
18849   fi
18850 
18851   # Now new_path has a complete unix path to the binary
18852   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18853     # Keep paths in /bin as-is, but remove trailing .exe if any
18854     new_path="${new_path/%.exe/}"
18855     # Do not save /bin paths to all_fixpath_prefixes!
18856   else
18857     # Not in mixed or Windows style, start by that.
18858     new_path=`cmd //c echo $new_path`
18859 
18860   input_path="$new_path"
18861   # Check if we need to convert this using DOS-style short mode. If the path
18862   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18863   # take no chances and rewrite it.
18864   # Note: m4 eats our [], so we need to use [ and ] instead.
18865   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18866   if test "x$has_forbidden_chars" != x; then
18867     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18868     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18869   fi
18870 
18871     # Output is in $new_path
18872 
18873   windows_path="$new_path"
18874   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18875     unix_path=`$CYGPATH -u "$windows_path"`
18876     new_path="$unix_path"
18877   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18878     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18879     new_path="$unix_path"
18880   fi
18881 
18882     # remove trailing .exe if any
18883     new_path="${new_path/%.exe/}"
18884 
18885     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18886     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18887   fi
18888 
18889     else
18890       # We're on a unix platform. Hooray! :)
18891       # First separate the path from the arguments. This will split at the first
18892       # space.
18893       complete="$FOUND_MAKE"
18894       path="${complete%% *}"
18895       tmp="$complete EOL"
18896       arguments="${tmp#* }"
18897 
18898       # Cannot rely on the command "which" here since it doesn't always work.
18899       is_absolute_path=`$ECHO "$path" | $GREP ^/`
18900       if test -z "$is_absolute_path"; then
18901         # Path to executable is not absolute. Find it.
18902         IFS_save="$IFS"
18903         IFS=:
18904         for p in $PATH; do
18905           if test -f "$p/$path" && test -x "$p/$path"; then
18906             new_path="$p/$path"
18907             break
18908           fi
18909         done
18910         IFS="$IFS_save"
18911       else
18912         # This is an absolute path, we can use it without further modifications.
18913         new_path="$path"
18914       fi
18915 
18916       if test "x$new_path" = x; then
18917         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18918 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18919         has_space=`$ECHO "$complete" | $GREP " "`
18920         if test "x$has_space" != x; then
18921           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18922 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18923         fi
18924         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18925       fi
18926     fi
18927 
18928     # Now join together the path and the arguments once again
18929     if test "x$arguments" != xEOL; then
18930       new_complete="$new_path ${arguments% *}"
18931     else
18932       new_complete="$new_path"
18933     fi
18934 
18935     if test "x$complete" != "x$new_complete"; then
18936       FOUND_MAKE="$new_complete"
18937       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18938 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18939     fi
18940   fi
18941 
18942         fi
18943       fi
18944     fi
18945   fi
18946 
18947         if test "x$FOUND_MAKE" = x; then
18948           for ac_prog in make
18949 do
18950   # Extract the first word of "$ac_prog", so it can be a program name with args.
18951 set dummy $ac_prog; ac_word=$2
18952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18953 $as_echo_n "checking for $ac_word... " >&6; }
18954 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18955   $as_echo_n "(cached) " >&6
18956 else
18957   case $CHECK_TOOLSDIR_MAKE in
18958   [\\/]* | ?:[\\/]*)
18959   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18960   ;;
18961   *)
18962   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18963 for as_dir in $PATH
18964 do
18965   IFS=$as_save_IFS
18966   test -z "$as_dir" && as_dir=.
18967     for ac_exec_ext in '' $ac_executable_extensions; do
18968   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18969     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18970     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18971     break 2
18972   fi
18973 done
18974   done
18975 IFS=$as_save_IFS
18976 
18977   ;;
18978 esac
18979 fi
18980 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18981 if test -n "$CHECK_TOOLSDIR_MAKE"; then
18982   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18983 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18984 else
18985   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18986 $as_echo "no" >&6; }
18987 fi
18988 
18989 
18990   test -n "$CHECK_TOOLSDIR_MAKE" && break
18991 done
18992 
18993 
18994   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18995   DESCRIPTION="make in tools-dir"
18996 
18997   # On Cygwin, we require a newer version of make than on other platforms
18998   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18999     MAKE_VERSION_EXPR="-e 4\."
19000     MAKE_REQUIRED_VERSION="4.0"
19001    else
19002     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19003     MAKE_REQUIRED_VERSION="3.81"
19004   fi
19005 
19006   if test "x$MAKE_CANDIDATE" != x; then
19007     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19008 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19009     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19010     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19011     if test "x$IS_GNU_MAKE" = x; then
19012       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19013 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19014     else
19015       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19016       if test "x$IS_MODERN_MAKE" = x; then
19017         { $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
19018 $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;}
19019       else
19020         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19021           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19022             MAKE_EXPECTED_ENV='cygwin'
19023           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19024             MAKE_EXPECTED_ENV='msys'
19025           else
19026             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19027           fi
19028           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19029           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19030         else
19031           # Not relevant for non-Windows
19032           IS_MAKE_CORRECT_ENV=true
19033         fi
19034         if test "x$IS_MAKE_CORRECT_ENV" = x; then
19035           { $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
19036 $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;}
19037         else
19038           FOUND_MAKE=$MAKE_CANDIDATE
19039 
19040   # Only process if variable expands to non-empty
19041 
19042   if test "x$FOUND_MAKE" != x; then
19043     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19044 
19045   # First separate the path from the arguments. This will split at the first
19046   # space.
19047   complete="$FOUND_MAKE"
19048   path="${complete%% *}"
19049   tmp="$complete EOL"
19050   arguments="${tmp#* }"
19051 
19052   # Input might be given as Windows format, start by converting to
19053   # unix format.
19054   new_path=`$CYGPATH -u "$path"`
19055 
19056   # Now try to locate executable using which
19057   new_path=`$WHICH "$new_path" 2> /dev/null`
19058   # bat and cmd files are not always considered executable in cygwin causing which
19059   # to not find them
19060   if test "x$new_path" = x \
19061       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19062       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19063     new_path=`$CYGPATH -u "$path"`
19064   fi
19065   if test "x$new_path" = x; then
19066     # Oops. Which didn't find the executable.
19067     # The splitting of arguments from the executable at a space might have been incorrect,
19068     # since paths with space are more likely in Windows. Give it another try with the whole
19069     # argument.
19070     path="$complete"
19071     arguments="EOL"
19072     new_path=`$CYGPATH -u "$path"`
19073     new_path=`$WHICH "$new_path" 2> /dev/null`
19074     # bat and cmd files are not always considered executable in cygwin causing which
19075     # to not find them
19076     if test "x$new_path" = x \
19077         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19078         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19079       new_path=`$CYGPATH -u "$path"`
19080     fi
19081     if test "x$new_path" = x; then
19082       # It's still not found. Now this is an unrecoverable error.
19083       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19084 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19085       has_space=`$ECHO "$complete" | $GREP " "`
19086       if test "x$has_space" != x; then
19087         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19088 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19089       fi
19090       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19091     fi
19092   fi
19093 
19094   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19095   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19096   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19097   # "foo.exe" is OK but "foo" is an error.
19098   #
19099   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19100   # It is also a way to make sure we got the proper file name for the real test later on.
19101   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19102   if test "x$test_shortpath" = x; then
19103     # Short path failed, file does not exist as specified.
19104     # Try adding .exe or .cmd
19105     if test -f "${new_path}.exe"; then
19106       input_to_shortpath="${new_path}.exe"
19107     elif test -f "${new_path}.cmd"; then
19108       input_to_shortpath="${new_path}.cmd"
19109     else
19110       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19111 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19112       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19113 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19114       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19115     fi
19116   else
19117     input_to_shortpath="$new_path"
19118   fi
19119 
19120   # Call helper function which possibly converts this using DOS-style short mode.
19121   # If so, the updated path is stored in $new_path.
19122   new_path="$input_to_shortpath"
19123 
19124   input_path="$input_to_shortpath"
19125   # Check if we need to convert this using DOS-style short mode. If the path
19126   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19127   # take no chances and rewrite it.
19128   # Note: m4 eats our [], so we need to use [ and ] instead.
19129   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19130   if test "x$has_forbidden_chars" != x; then
19131     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19132     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19133     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19134     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19135       # Going to short mode and back again did indeed matter. Since short mode is
19136       # case insensitive, let's make it lowercase to improve readability.
19137       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19138       # Now convert it back to Unix-style (cygpath)
19139       input_path=`$CYGPATH -u "$shortmode_path"`
19140       new_path="$input_path"
19141     fi
19142   fi
19143 
19144   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19145   if test "x$test_cygdrive_prefix" = x; then
19146     # As a simple fix, exclude /usr/bin since it's not a real path.
19147     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19148       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19149       # a path prefixed by /cygdrive for fixpath to work.
19150       new_path="$CYGWIN_ROOT_PATH$input_path"
19151     fi
19152   fi
19153 
19154   # remove trailing .exe if any
19155   new_path="${new_path/%.exe/}"
19156 
19157     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19158 
19159   # First separate the path from the arguments. This will split at the first
19160   # space.
19161   complete="$FOUND_MAKE"
19162   path="${complete%% *}"
19163   tmp="$complete EOL"
19164   arguments="${tmp#* }"
19165 
19166   # Input might be given as Windows format, start by converting to
19167   # unix format.
19168   new_path="$path"
19169 
19170   windows_path="$new_path"
19171   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19172     unix_path=`$CYGPATH -u "$windows_path"`
19173     new_path="$unix_path"
19174   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19175     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19176     new_path="$unix_path"
19177   fi
19178 
19179 
19180   # Now try to locate executable using which
19181   new_path=`$WHICH "$new_path" 2> /dev/null`
19182 
19183   if test "x$new_path" = x; then
19184     # Oops. Which didn't find the executable.
19185     # The splitting of arguments from the executable at a space might have been incorrect,
19186     # since paths with space are more likely in Windows. Give it another try with the whole
19187     # argument.
19188     path="$complete"
19189     arguments="EOL"
19190     new_path="$path"
19191 
19192   windows_path="$new_path"
19193   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19194     unix_path=`$CYGPATH -u "$windows_path"`
19195     new_path="$unix_path"
19196   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19197     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19198     new_path="$unix_path"
19199   fi
19200 
19201 
19202     new_path=`$WHICH "$new_path" 2> /dev/null`
19203     # bat and cmd files are not always considered executable in MSYS causing which
19204     # to not find them
19205     if test "x$new_path" = x \
19206         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19207         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19208       new_path="$path"
19209 
19210   windows_path="$new_path"
19211   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19212     unix_path=`$CYGPATH -u "$windows_path"`
19213     new_path="$unix_path"
19214   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19215     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19216     new_path="$unix_path"
19217   fi
19218 
19219     fi
19220 
19221     if test "x$new_path" = x; then
19222       # It's still not found. Now this is an unrecoverable error.
19223       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19224 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19225       has_space=`$ECHO "$complete" | $GREP " "`
19226       if test "x$has_space" != x; then
19227         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19228 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19229       fi
19230       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19231     fi
19232   fi
19233 
19234   # Now new_path has a complete unix path to the binary
19235   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19236     # Keep paths in /bin as-is, but remove trailing .exe if any
19237     new_path="${new_path/%.exe/}"
19238     # Do not save /bin paths to all_fixpath_prefixes!
19239   else
19240     # Not in mixed or Windows style, start by that.
19241     new_path=`cmd //c echo $new_path`
19242 
19243   input_path="$new_path"
19244   # Check if we need to convert this using DOS-style short mode. If the path
19245   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19246   # take no chances and rewrite it.
19247   # Note: m4 eats our [], so we need to use [ and ] instead.
19248   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19249   if test "x$has_forbidden_chars" != x; then
19250     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19251     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19252   fi
19253 
19254     # Output is in $new_path
19255 
19256   windows_path="$new_path"
19257   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19258     unix_path=`$CYGPATH -u "$windows_path"`
19259     new_path="$unix_path"
19260   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19261     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19262     new_path="$unix_path"
19263   fi
19264 
19265     # remove trailing .exe if any
19266     new_path="${new_path/%.exe/}"
19267 
19268     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19269     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19270   fi
19271 
19272     else
19273       # We're on a unix platform. Hooray! :)
19274       # First separate the path from the arguments. This will split at the first
19275       # space.
19276       complete="$FOUND_MAKE"
19277       path="${complete%% *}"
19278       tmp="$complete EOL"
19279       arguments="${tmp#* }"
19280 
19281       # Cannot rely on the command "which" here since it doesn't always work.
19282       is_absolute_path=`$ECHO "$path" | $GREP ^/`
19283       if test -z "$is_absolute_path"; then
19284         # Path to executable is not absolute. Find it.
19285         IFS_save="$IFS"
19286         IFS=:
19287         for p in $PATH; do
19288           if test -f "$p/$path" && test -x "$p/$path"; then
19289             new_path="$p/$path"
19290             break
19291           fi
19292         done
19293         IFS="$IFS_save"
19294       else
19295         # This is an absolute path, we can use it without further modifications.
19296         new_path="$path"
19297       fi
19298 
19299       if test "x$new_path" = x; then
19300         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19301 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19302         has_space=`$ECHO "$complete" | $GREP " "`
19303         if test "x$has_space" != x; then
19304           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19305 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19306         fi
19307         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19308       fi
19309     fi
19310 
19311     # Now join together the path and the arguments once again
19312     if test "x$arguments" != xEOL; then
19313       new_complete="$new_path ${arguments% *}"
19314     else
19315       new_complete="$new_path"
19316     fi
19317 
19318     if test "x$complete" != "x$new_complete"; then
19319       FOUND_MAKE="$new_complete"
19320       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19321 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19322     fi
19323   fi
19324 
19325         fi
19326       fi
19327     fi
19328   fi
19329 
19330         fi
19331         PATH=$OLD_PATH
19332       fi
19333     fi
19334 
19335     if test "x$FOUND_MAKE" = x; then
19336       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
19337     fi
19338 
19339   else
19340     # The variable is set, but is it from the command line or the environment?
19341 
19342     # Try to remove the string !MAKE! from our list.
19343     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19344     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19345       # If it failed, the variable was not from the command line. Ignore it,
19346       # but warn the user (except for BASH, which is always set by the calling BASH).
19347       if test "xMAKE" != xBASH; then
19348         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19349 $as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19350       fi
19351       # Try to locate tool using the code snippet
19352 
19353     # Try our hardest to locate a correct version of GNU make
19354     for ac_prog in gmake
19355 do
19356   # Extract the first word of "$ac_prog", so it can be a program name with args.
19357 set dummy $ac_prog; ac_word=$2
19358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19359 $as_echo_n "checking for $ac_word... " >&6; }
19360 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19361   $as_echo_n "(cached) " >&6
19362 else
19363   case $CHECK_GMAKE in
19364   [\\/]* | ?:[\\/]*)
19365   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19366   ;;
19367   *)
19368   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19369 for as_dir in $PATH
19370 do
19371   IFS=$as_save_IFS
19372   test -z "$as_dir" && as_dir=.
19373     for ac_exec_ext in '' $ac_executable_extensions; do
19374   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19375     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19376     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19377     break 2
19378   fi
19379 done
19380   done
19381 IFS=$as_save_IFS
19382 
19383   ;;
19384 esac
19385 fi
19386 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19387 if test -n "$CHECK_GMAKE"; then
19388   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19389 $as_echo "$CHECK_GMAKE" >&6; }
19390 else
19391   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19392 $as_echo "no" >&6; }
19393 fi
19394 
19395 
19396   test -n "$CHECK_GMAKE" && break
19397 done
19398 
19399 
19400   MAKE_CANDIDATE=""$CHECK_GMAKE""
19401   DESCRIPTION="gmake in PATH"
19402 
19403   # On Cygwin, we require a newer version of make than on other platforms
19404   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19405     MAKE_VERSION_EXPR="-e 4\."
19406     MAKE_REQUIRED_VERSION="4.0"
19407    else
19408     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19409     MAKE_REQUIRED_VERSION="3.81"
19410   fi
19411 
19412   if test "x$MAKE_CANDIDATE" != x; then
19413     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19414 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19415     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19416     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19417     if test "x$IS_GNU_MAKE" = x; then
19418       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19419 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19420     else
19421       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19422       if test "x$IS_MODERN_MAKE" = x; then
19423         { $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
19424 $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;}
19425       else
19426         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19427           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19428             MAKE_EXPECTED_ENV='cygwin'
19429           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19430             MAKE_EXPECTED_ENV='msys'
19431           else
19432             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19433           fi
19434           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19435           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19436         else
19437           # Not relevant for non-Windows
19438           IS_MAKE_CORRECT_ENV=true
19439         fi
19440         if test "x$IS_MAKE_CORRECT_ENV" = x; then
19441           { $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
19442 $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;}
19443         else
19444           FOUND_MAKE=$MAKE_CANDIDATE
19445 
19446   # Only process if variable expands to non-empty
19447 
19448   if test "x$FOUND_MAKE" != x; then
19449     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19450 
19451   # First separate the path from the arguments. This will split at the first
19452   # space.
19453   complete="$FOUND_MAKE"
19454   path="${complete%% *}"
19455   tmp="$complete EOL"
19456   arguments="${tmp#* }"
19457 
19458   # Input might be given as Windows format, start by converting to
19459   # unix format.
19460   new_path=`$CYGPATH -u "$path"`
19461 
19462   # Now try to locate executable using which
19463   new_path=`$WHICH "$new_path" 2> /dev/null`
19464   # bat and cmd files are not always considered executable in cygwin causing which
19465   # to not find them
19466   if test "x$new_path" = x \
19467       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19468       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19469     new_path=`$CYGPATH -u "$path"`
19470   fi
19471   if test "x$new_path" = x; then
19472     # Oops. Which didn't find the executable.
19473     # The splitting of arguments from the executable at a space might have been incorrect,
19474     # since paths with space are more likely in Windows. Give it another try with the whole
19475     # argument.
19476     path="$complete"
19477     arguments="EOL"
19478     new_path=`$CYGPATH -u "$path"`
19479     new_path=`$WHICH "$new_path" 2> /dev/null`
19480     # bat and cmd files are not always considered executable in cygwin causing which
19481     # to not find them
19482     if test "x$new_path" = x \
19483         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19484         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19485       new_path=`$CYGPATH -u "$path"`
19486     fi
19487     if test "x$new_path" = x; then
19488       # It's still not found. Now this is an unrecoverable error.
19489       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19490 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19491       has_space=`$ECHO "$complete" | $GREP " "`
19492       if test "x$has_space" != x; then
19493         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19494 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19495       fi
19496       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19497     fi
19498   fi
19499 
19500   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19501   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19502   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19503   # "foo.exe" is OK but "foo" is an error.
19504   #
19505   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19506   # It is also a way to make sure we got the proper file name for the real test later on.
19507   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19508   if test "x$test_shortpath" = x; then
19509     # Short path failed, file does not exist as specified.
19510     # Try adding .exe or .cmd
19511     if test -f "${new_path}.exe"; then
19512       input_to_shortpath="${new_path}.exe"
19513     elif test -f "${new_path}.cmd"; then
19514       input_to_shortpath="${new_path}.cmd"
19515     else
19516       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19517 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19518       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19519 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19520       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19521     fi
19522   else
19523     input_to_shortpath="$new_path"
19524   fi
19525 
19526   # Call helper function which possibly converts this using DOS-style short mode.
19527   # If so, the updated path is stored in $new_path.
19528   new_path="$input_to_shortpath"
19529 
19530   input_path="$input_to_shortpath"
19531   # Check if we need to convert this using DOS-style short mode. If the path
19532   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19533   # take no chances and rewrite it.
19534   # Note: m4 eats our [], so we need to use [ and ] instead.
19535   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19536   if test "x$has_forbidden_chars" != x; then
19537     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19538     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19539     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19540     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19541       # Going to short mode and back again did indeed matter. Since short mode is
19542       # case insensitive, let's make it lowercase to improve readability.
19543       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19544       # Now convert it back to Unix-style (cygpath)
19545       input_path=`$CYGPATH -u "$shortmode_path"`
19546       new_path="$input_path"
19547     fi
19548   fi
19549 
19550   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19551   if test "x$test_cygdrive_prefix" = x; then
19552     # As a simple fix, exclude /usr/bin since it's not a real path.
19553     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19554       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19555       # a path prefixed by /cygdrive for fixpath to work.
19556       new_path="$CYGWIN_ROOT_PATH$input_path"
19557     fi
19558   fi
19559 
19560   # remove trailing .exe if any
19561   new_path="${new_path/%.exe/}"
19562 
19563     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19564 
19565   # First separate the path from the arguments. This will split at the first
19566   # space.
19567   complete="$FOUND_MAKE"
19568   path="${complete%% *}"
19569   tmp="$complete EOL"
19570   arguments="${tmp#* }"
19571 
19572   # Input might be given as Windows format, start by converting to
19573   # unix format.
19574   new_path="$path"
19575 
19576   windows_path="$new_path"
19577   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19578     unix_path=`$CYGPATH -u "$windows_path"`
19579     new_path="$unix_path"
19580   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19581     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19582     new_path="$unix_path"
19583   fi
19584 
19585 
19586   # Now try to locate executable using which
19587   new_path=`$WHICH "$new_path" 2> /dev/null`
19588 
19589   if test "x$new_path" = x; then
19590     # Oops. Which didn't find the executable.
19591     # The splitting of arguments from the executable at a space might have been incorrect,
19592     # since paths with space are more likely in Windows. Give it another try with the whole
19593     # argument.
19594     path="$complete"
19595     arguments="EOL"
19596     new_path="$path"
19597 
19598   windows_path="$new_path"
19599   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19600     unix_path=`$CYGPATH -u "$windows_path"`
19601     new_path="$unix_path"
19602   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19603     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19604     new_path="$unix_path"
19605   fi
19606 
19607 
19608     new_path=`$WHICH "$new_path" 2> /dev/null`
19609     # bat and cmd files are not always considered executable in MSYS causing which
19610     # to not find them
19611     if test "x$new_path" = x \
19612         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19613         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19614       new_path="$path"
19615 
19616   windows_path="$new_path"
19617   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19618     unix_path=`$CYGPATH -u "$windows_path"`
19619     new_path="$unix_path"
19620   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19621     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19622     new_path="$unix_path"
19623   fi
19624 
19625     fi
19626 
19627     if test "x$new_path" = x; then
19628       # It's still not found. Now this is an unrecoverable error.
19629       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19630 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19631       has_space=`$ECHO "$complete" | $GREP " "`
19632       if test "x$has_space" != x; then
19633         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19634 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19635       fi
19636       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19637     fi
19638   fi
19639 
19640   # Now new_path has a complete unix path to the binary
19641   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19642     # Keep paths in /bin as-is, but remove trailing .exe if any
19643     new_path="${new_path/%.exe/}"
19644     # Do not save /bin paths to all_fixpath_prefixes!
19645   else
19646     # Not in mixed or Windows style, start by that.
19647     new_path=`cmd //c echo $new_path`
19648 
19649   input_path="$new_path"
19650   # Check if we need to convert this using DOS-style short mode. If the path
19651   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19652   # take no chances and rewrite it.
19653   # Note: m4 eats our [], so we need to use [ and ] instead.
19654   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19655   if test "x$has_forbidden_chars" != x; then
19656     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19657     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19658   fi
19659 
19660     # Output is in $new_path
19661 
19662   windows_path="$new_path"
19663   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19664     unix_path=`$CYGPATH -u "$windows_path"`
19665     new_path="$unix_path"
19666   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19667     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19668     new_path="$unix_path"
19669   fi
19670 
19671     # remove trailing .exe if any
19672     new_path="${new_path/%.exe/}"
19673 
19674     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19675     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19676   fi
19677 
19678     else
19679       # We're on a unix platform. Hooray! :)
19680       # First separate the path from the arguments. This will split at the first
19681       # space.
19682       complete="$FOUND_MAKE"
19683       path="${complete%% *}"
19684       tmp="$complete EOL"
19685       arguments="${tmp#* }"
19686 
19687       # Cannot rely on the command "which" here since it doesn't always work.
19688       is_absolute_path=`$ECHO "$path" | $GREP ^/`
19689       if test -z "$is_absolute_path"; then
19690         # Path to executable is not absolute. Find it.
19691         IFS_save="$IFS"
19692         IFS=:
19693         for p in $PATH; do
19694           if test -f "$p/$path" && test -x "$p/$path"; then
19695             new_path="$p/$path"
19696             break
19697           fi
19698         done
19699         IFS="$IFS_save"
19700       else
19701         # This is an absolute path, we can use it without further modifications.
19702         new_path="$path"
19703       fi
19704 
19705       if test "x$new_path" = x; then
19706         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19707 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19708         has_space=`$ECHO "$complete" | $GREP " "`
19709         if test "x$has_space" != x; then
19710           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19711 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19712         fi
19713         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19714       fi
19715     fi
19716 
19717     # Now join together the path and the arguments once again
19718     if test "x$arguments" != xEOL; then
19719       new_complete="$new_path ${arguments% *}"
19720     else
19721       new_complete="$new_path"
19722     fi
19723 
19724     if test "x$complete" != "x$new_complete"; then
19725       FOUND_MAKE="$new_complete"
19726       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19727 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19728     fi
19729   fi
19730 
19731         fi
19732       fi
19733     fi
19734   fi
19735 
19736 
19737     if test "x$FOUND_MAKE" = x; then
19738       for ac_prog in make
19739 do
19740   # Extract the first word of "$ac_prog", so it can be a program name with args.
19741 set dummy $ac_prog; ac_word=$2
19742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19743 $as_echo_n "checking for $ac_word... " >&6; }
19744 if ${ac_cv_path_CHECK_MAKE+:} false; then :
19745   $as_echo_n "(cached) " >&6
19746 else
19747   case $CHECK_MAKE in
19748   [\\/]* | ?:[\\/]*)
19749   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19750   ;;
19751   *)
19752   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19753 for as_dir in $PATH
19754 do
19755   IFS=$as_save_IFS
19756   test -z "$as_dir" && as_dir=.
19757     for ac_exec_ext in '' $ac_executable_extensions; do
19758   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19759     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19760     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19761     break 2
19762   fi
19763 done
19764   done
19765 IFS=$as_save_IFS
19766 
19767   ;;
19768 esac
19769 fi
19770 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19771 if test -n "$CHECK_MAKE"; then
19772   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19773 $as_echo "$CHECK_MAKE" >&6; }
19774 else
19775   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19776 $as_echo "no" >&6; }
19777 fi
19778 
19779 
19780   test -n "$CHECK_MAKE" && break
19781 done
19782 
19783 
19784   MAKE_CANDIDATE=""$CHECK_MAKE""
19785   DESCRIPTION="make in PATH"
19786 
19787   # On Cygwin, we require a newer version of make than on other platforms
19788   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19789     MAKE_VERSION_EXPR="-e 4\."
19790     MAKE_REQUIRED_VERSION="4.0"
19791    else
19792     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19793     MAKE_REQUIRED_VERSION="3.81"
19794   fi
19795 
19796   if test "x$MAKE_CANDIDATE" != x; then
19797     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19798 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19799     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19800     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19801     if test "x$IS_GNU_MAKE" = x; then
19802       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19803 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19804     else
19805       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19806       if test "x$IS_MODERN_MAKE" = x; then
19807         { $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
19808 $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;}
19809       else
19810         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19811           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19812             MAKE_EXPECTED_ENV='cygwin'
19813           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19814             MAKE_EXPECTED_ENV='msys'
19815           else
19816             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19817           fi
19818           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19819           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19820         else
19821           # Not relevant for non-Windows
19822           IS_MAKE_CORRECT_ENV=true
19823         fi
19824         if test "x$IS_MAKE_CORRECT_ENV" = x; then
19825           { $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
19826 $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;}
19827         else
19828           FOUND_MAKE=$MAKE_CANDIDATE
19829 
19830   # Only process if variable expands to non-empty
19831 
19832   if test "x$FOUND_MAKE" != x; then
19833     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19834 
19835   # First separate the path from the arguments. This will split at the first
19836   # space.
19837   complete="$FOUND_MAKE"
19838   path="${complete%% *}"
19839   tmp="$complete EOL"
19840   arguments="${tmp#* }"
19841 
19842   # Input might be given as Windows format, start by converting to
19843   # unix format.
19844   new_path=`$CYGPATH -u "$path"`
19845 
19846   # Now try to locate executable using which
19847   new_path=`$WHICH "$new_path" 2> /dev/null`
19848   # bat and cmd files are not always considered executable in cygwin causing which
19849   # to not find them
19850   if test "x$new_path" = x \
19851       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19852       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19853     new_path=`$CYGPATH -u "$path"`
19854   fi
19855   if test "x$new_path" = x; then
19856     # Oops. Which didn't find the executable.
19857     # The splitting of arguments from the executable at a space might have been incorrect,
19858     # since paths with space are more likely in Windows. Give it another try with the whole
19859     # argument.
19860     path="$complete"
19861     arguments="EOL"
19862     new_path=`$CYGPATH -u "$path"`
19863     new_path=`$WHICH "$new_path" 2> /dev/null`
19864     # bat and cmd files are not always considered executable in cygwin causing which
19865     # to not find them
19866     if test "x$new_path" = x \
19867         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19868         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19869       new_path=`$CYGPATH -u "$path"`
19870     fi
19871     if test "x$new_path" = x; then
19872       # It's still not found. Now this is an unrecoverable error.
19873       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19874 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19875       has_space=`$ECHO "$complete" | $GREP " "`
19876       if test "x$has_space" != x; then
19877         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19878 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19879       fi
19880       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19881     fi
19882   fi
19883 
19884   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19885   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19886   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19887   # "foo.exe" is OK but "foo" is an error.
19888   #
19889   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19890   # It is also a way to make sure we got the proper file name for the real test later on.
19891   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19892   if test "x$test_shortpath" = x; then
19893     # Short path failed, file does not exist as specified.
19894     # Try adding .exe or .cmd
19895     if test -f "${new_path}.exe"; then
19896       input_to_shortpath="${new_path}.exe"
19897     elif test -f "${new_path}.cmd"; then
19898       input_to_shortpath="${new_path}.cmd"
19899     else
19900       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19901 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19902       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19903 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19904       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19905     fi
19906   else
19907     input_to_shortpath="$new_path"
19908   fi
19909 
19910   # Call helper function which possibly converts this using DOS-style short mode.
19911   # If so, the updated path is stored in $new_path.
19912   new_path="$input_to_shortpath"
19913 
19914   input_path="$input_to_shortpath"
19915   # Check if we need to convert this using DOS-style short mode. If the path
19916   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19917   # take no chances and rewrite it.
19918   # Note: m4 eats our [], so we need to use [ and ] instead.
19919   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19920   if test "x$has_forbidden_chars" != x; then
19921     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19922     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19923     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19924     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19925       # Going to short mode and back again did indeed matter. Since short mode is
19926       # case insensitive, let's make it lowercase to improve readability.
19927       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19928       # Now convert it back to Unix-style (cygpath)
19929       input_path=`$CYGPATH -u "$shortmode_path"`
19930       new_path="$input_path"
19931     fi
19932   fi
19933 
19934   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19935   if test "x$test_cygdrive_prefix" = x; then
19936     # As a simple fix, exclude /usr/bin since it's not a real path.
19937     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19938       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19939       # a path prefixed by /cygdrive for fixpath to work.
19940       new_path="$CYGWIN_ROOT_PATH$input_path"
19941     fi
19942   fi
19943 
19944   # remove trailing .exe if any
19945   new_path="${new_path/%.exe/}"
19946 
19947     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19948 
19949   # First separate the path from the arguments. This will split at the first
19950   # space.
19951   complete="$FOUND_MAKE"
19952   path="${complete%% *}"
19953   tmp="$complete EOL"
19954   arguments="${tmp#* }"
19955 
19956   # Input might be given as Windows format, start by converting to
19957   # unix format.
19958   new_path="$path"
19959 
19960   windows_path="$new_path"
19961   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19962     unix_path=`$CYGPATH -u "$windows_path"`
19963     new_path="$unix_path"
19964   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19965     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19966     new_path="$unix_path"
19967   fi
19968 
19969 
19970   # Now try to locate executable using which
19971   new_path=`$WHICH "$new_path" 2> /dev/null`
19972 
19973   if test "x$new_path" = x; then
19974     # Oops. Which didn't find the executable.
19975     # The splitting of arguments from the executable at a space might have been incorrect,
19976     # since paths with space are more likely in Windows. Give it another try with the whole
19977     # argument.
19978     path="$complete"
19979     arguments="EOL"
19980     new_path="$path"
19981 
19982   windows_path="$new_path"
19983   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19984     unix_path=`$CYGPATH -u "$windows_path"`
19985     new_path="$unix_path"
19986   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19987     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19988     new_path="$unix_path"
19989   fi
19990 
19991 
19992     new_path=`$WHICH "$new_path" 2> /dev/null`
19993     # bat and cmd files are not always considered executable in MSYS causing which
19994     # to not find them
19995     if test "x$new_path" = x \
19996         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19997         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19998       new_path="$path"
19999 
20000   windows_path="$new_path"
20001   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20002     unix_path=`$CYGPATH -u "$windows_path"`
20003     new_path="$unix_path"
20004   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20005     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20006     new_path="$unix_path"
20007   fi
20008 
20009     fi
20010 
20011     if test "x$new_path" = x; then
20012       # It's still not found. Now this is an unrecoverable error.
20013       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20014 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20015       has_space=`$ECHO "$complete" | $GREP " "`
20016       if test "x$has_space" != x; then
20017         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20018 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20019       fi
20020       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20021     fi
20022   fi
20023 
20024   # Now new_path has a complete unix path to the binary
20025   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20026     # Keep paths in /bin as-is, but remove trailing .exe if any
20027     new_path="${new_path/%.exe/}"
20028     # Do not save /bin paths to all_fixpath_prefixes!
20029   else
20030     # Not in mixed or Windows style, start by that.
20031     new_path=`cmd //c echo $new_path`
20032 
20033   input_path="$new_path"
20034   # Check if we need to convert this using DOS-style short mode. If the path
20035   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20036   # take no chances and rewrite it.
20037   # Note: m4 eats our [], so we need to use [ and ] instead.
20038   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20039   if test "x$has_forbidden_chars" != x; then
20040     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20041     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20042   fi
20043 
20044     # Output is in $new_path
20045 
20046   windows_path="$new_path"
20047   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20048     unix_path=`$CYGPATH -u "$windows_path"`
20049     new_path="$unix_path"
20050   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20051     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20052     new_path="$unix_path"
20053   fi
20054 
20055     # remove trailing .exe if any
20056     new_path="${new_path/%.exe/}"
20057 
20058     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20059     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20060   fi
20061 
20062     else
20063       # We're on a unix platform. Hooray! :)
20064       # First separate the path from the arguments. This will split at the first
20065       # space.
20066       complete="$FOUND_MAKE"
20067       path="${complete%% *}"
20068       tmp="$complete EOL"
20069       arguments="${tmp#* }"
20070 
20071       # Cannot rely on the command "which" here since it doesn't always work.
20072       is_absolute_path=`$ECHO "$path" | $GREP ^/`
20073       if test -z "$is_absolute_path"; then
20074         # Path to executable is not absolute. Find it.
20075         IFS_save="$IFS"
20076         IFS=:
20077         for p in $PATH; do
20078           if test -f "$p/$path" && test -x "$p/$path"; then
20079             new_path="$p/$path"
20080             break
20081           fi
20082         done
20083         IFS="$IFS_save"
20084       else
20085         # This is an absolute path, we can use it without further modifications.
20086         new_path="$path"
20087       fi
20088 
20089       if test "x$new_path" = x; then
20090         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20091 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20092         has_space=`$ECHO "$complete" | $GREP " "`
20093         if test "x$has_space" != x; then
20094           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20095 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20096         fi
20097         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20098       fi
20099     fi
20100 
20101     # Now join together the path and the arguments once again
20102     if test "x$arguments" != xEOL; then
20103       new_complete="$new_path ${arguments% *}"
20104     else
20105       new_complete="$new_path"
20106     fi
20107 
20108     if test "x$complete" != "x$new_complete"; then
20109       FOUND_MAKE="$new_complete"
20110       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20111 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20112     fi
20113   fi
20114 
20115         fi
20116       fi
20117     fi
20118   fi
20119 
20120     fi
20121 
20122     if test "x$FOUND_MAKE" = x; then
20123       if test "x$TOOLCHAIN_PATH" != x; then
20124         # We have a toolchain path, check that as well before giving up.
20125         OLD_PATH=$PATH
20126         PATH=$TOOLCHAIN_PATH:$PATH
20127         for ac_prog in gmake
20128 do
20129   # Extract the first word of "$ac_prog", so it can be a program name with args.
20130 set dummy $ac_prog; ac_word=$2
20131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20132 $as_echo_n "checking for $ac_word... " >&6; }
20133 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
20134   $as_echo_n "(cached) " >&6
20135 else
20136   case $CHECK_TOOLSDIR_GMAKE in
20137   [\\/]* | ?:[\\/]*)
20138   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
20139   ;;
20140   *)
20141   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20142 for as_dir in $PATH
20143 do
20144   IFS=$as_save_IFS
20145   test -z "$as_dir" && as_dir=.
20146     for ac_exec_ext in '' $ac_executable_extensions; do
20147   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20148     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
20149     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20150     break 2
20151   fi
20152 done
20153   done
20154 IFS=$as_save_IFS
20155 
20156   ;;
20157 esac
20158 fi
20159 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
20160 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
20161   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
20162 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
20163 else
20164   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20165 $as_echo "no" >&6; }
20166 fi
20167 
20168 
20169   test -n "$CHECK_TOOLSDIR_GMAKE" && break
20170 done
20171 
20172 
20173   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
20174   DESCRIPTION="gmake in tools-dir"
20175 
20176   # On Cygwin, we require a newer version of make than on other platforms
20177   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20178     MAKE_VERSION_EXPR="-e 4\."
20179     MAKE_REQUIRED_VERSION="4.0"
20180    else
20181     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20182     MAKE_REQUIRED_VERSION="3.81"
20183   fi
20184 
20185   if test "x$MAKE_CANDIDATE" != x; then
20186     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20187 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20188     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20189     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20190     if test "x$IS_GNU_MAKE" = x; then
20191       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20192 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20193     else
20194       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20195       if test "x$IS_MODERN_MAKE" = x; then
20196         { $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
20197 $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;}
20198       else
20199         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20200           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20201             MAKE_EXPECTED_ENV='cygwin'
20202           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20203             MAKE_EXPECTED_ENV='msys'
20204           else
20205             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20206           fi
20207           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20208           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20209         else
20210           # Not relevant for non-Windows
20211           IS_MAKE_CORRECT_ENV=true
20212         fi
20213         if test "x$IS_MAKE_CORRECT_ENV" = x; then
20214           { $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
20215 $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;}
20216         else
20217           FOUND_MAKE=$MAKE_CANDIDATE
20218 
20219   # Only process if variable expands to non-empty
20220 
20221   if test "x$FOUND_MAKE" != x; then
20222     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20223 
20224   # First separate the path from the arguments. This will split at the first
20225   # space.
20226   complete="$FOUND_MAKE"
20227   path="${complete%% *}"
20228   tmp="$complete EOL"
20229   arguments="${tmp#* }"
20230 
20231   # Input might be given as Windows format, start by converting to
20232   # unix format.
20233   new_path=`$CYGPATH -u "$path"`
20234 
20235   # Now try to locate executable using which
20236   new_path=`$WHICH "$new_path" 2> /dev/null`
20237   # bat and cmd files are not always considered executable in cygwin causing which
20238   # to not find them
20239   if test "x$new_path" = x \
20240       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20241       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20242     new_path=`$CYGPATH -u "$path"`
20243   fi
20244   if test "x$new_path" = x; then
20245     # Oops. Which didn't find the executable.
20246     # The splitting of arguments from the executable at a space might have been incorrect,
20247     # since paths with space are more likely in Windows. Give it another try with the whole
20248     # argument.
20249     path="$complete"
20250     arguments="EOL"
20251     new_path=`$CYGPATH -u "$path"`
20252     new_path=`$WHICH "$new_path" 2> /dev/null`
20253     # bat and cmd files are not always considered executable in cygwin causing which
20254     # to not find them
20255     if test "x$new_path" = x \
20256         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20257         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20258       new_path=`$CYGPATH -u "$path"`
20259     fi
20260     if test "x$new_path" = x; then
20261       # It's still not found. Now this is an unrecoverable error.
20262       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20263 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20264       has_space=`$ECHO "$complete" | $GREP " "`
20265       if test "x$has_space" != x; then
20266         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20267 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20268       fi
20269       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20270     fi
20271   fi
20272 
20273   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20274   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20275   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20276   # "foo.exe" is OK but "foo" is an error.
20277   #
20278   # This test is therefore slightly more accurate than "test -f" to check for file presence.
20279   # It is also a way to make sure we got the proper file name for the real test later on.
20280   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20281   if test "x$test_shortpath" = x; then
20282     # Short path failed, file does not exist as specified.
20283     # Try adding .exe or .cmd
20284     if test -f "${new_path}.exe"; then
20285       input_to_shortpath="${new_path}.exe"
20286     elif test -f "${new_path}.cmd"; then
20287       input_to_shortpath="${new_path}.cmd"
20288     else
20289       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20290 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20291       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20292 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20293       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20294     fi
20295   else
20296     input_to_shortpath="$new_path"
20297   fi
20298 
20299   # Call helper function which possibly converts this using DOS-style short mode.
20300   # If so, the updated path is stored in $new_path.
20301   new_path="$input_to_shortpath"
20302 
20303   input_path="$input_to_shortpath"
20304   # Check if we need to convert this using DOS-style short mode. If the path
20305   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20306   # take no chances and rewrite it.
20307   # Note: m4 eats our [], so we need to use [ and ] instead.
20308   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20309   if test "x$has_forbidden_chars" != x; then
20310     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20311     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20312     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20313     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20314       # Going to short mode and back again did indeed matter. Since short mode is
20315       # case insensitive, let's make it lowercase to improve readability.
20316       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20317       # Now convert it back to Unix-style (cygpath)
20318       input_path=`$CYGPATH -u "$shortmode_path"`
20319       new_path="$input_path"
20320     fi
20321   fi
20322 
20323   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20324   if test "x$test_cygdrive_prefix" = x; then
20325     # As a simple fix, exclude /usr/bin since it's not a real path.
20326     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20327       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20328       # a path prefixed by /cygdrive for fixpath to work.
20329       new_path="$CYGWIN_ROOT_PATH$input_path"
20330     fi
20331   fi
20332 
20333   # remove trailing .exe if any
20334   new_path="${new_path/%.exe/}"
20335 
20336     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20337 
20338   # First separate the path from the arguments. This will split at the first
20339   # space.
20340   complete="$FOUND_MAKE"
20341   path="${complete%% *}"
20342   tmp="$complete EOL"
20343   arguments="${tmp#* }"
20344 
20345   # Input might be given as Windows format, start by converting to
20346   # unix format.
20347   new_path="$path"
20348 
20349   windows_path="$new_path"
20350   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20351     unix_path=`$CYGPATH -u "$windows_path"`
20352     new_path="$unix_path"
20353   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20354     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20355     new_path="$unix_path"
20356   fi
20357 
20358 
20359   # Now try to locate executable using which
20360   new_path=`$WHICH "$new_path" 2> /dev/null`
20361 
20362   if test "x$new_path" = x; then
20363     # Oops. Which didn't find the executable.
20364     # The splitting of arguments from the executable at a space might have been incorrect,
20365     # since paths with space are more likely in Windows. Give it another try with the whole
20366     # argument.
20367     path="$complete"
20368     arguments="EOL"
20369     new_path="$path"
20370 
20371   windows_path="$new_path"
20372   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20373     unix_path=`$CYGPATH -u "$windows_path"`
20374     new_path="$unix_path"
20375   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20376     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20377     new_path="$unix_path"
20378   fi
20379 
20380 
20381     new_path=`$WHICH "$new_path" 2> /dev/null`
20382     # bat and cmd files are not always considered executable in MSYS causing which
20383     # to not find them
20384     if test "x$new_path" = x \
20385         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20386         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20387       new_path="$path"
20388 
20389   windows_path="$new_path"
20390   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20391     unix_path=`$CYGPATH -u "$windows_path"`
20392     new_path="$unix_path"
20393   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20394     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20395     new_path="$unix_path"
20396   fi
20397 
20398     fi
20399 
20400     if test "x$new_path" = x; then
20401       # It's still not found. Now this is an unrecoverable error.
20402       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20403 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20404       has_space=`$ECHO "$complete" | $GREP " "`
20405       if test "x$has_space" != x; then
20406         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20407 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20408       fi
20409       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20410     fi
20411   fi
20412 
20413   # Now new_path has a complete unix path to the binary
20414   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20415     # Keep paths in /bin as-is, but remove trailing .exe if any
20416     new_path="${new_path/%.exe/}"
20417     # Do not save /bin paths to all_fixpath_prefixes!
20418   else
20419     # Not in mixed or Windows style, start by that.
20420     new_path=`cmd //c echo $new_path`
20421 
20422   input_path="$new_path"
20423   # Check if we need to convert this using DOS-style short mode. If the path
20424   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20425   # take no chances and rewrite it.
20426   # Note: m4 eats our [], so we need to use [ and ] instead.
20427   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20428   if test "x$has_forbidden_chars" != x; then
20429     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20430     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20431   fi
20432 
20433     # Output is in $new_path
20434 
20435   windows_path="$new_path"
20436   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20437     unix_path=`$CYGPATH -u "$windows_path"`
20438     new_path="$unix_path"
20439   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20440     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20441     new_path="$unix_path"
20442   fi
20443 
20444     # remove trailing .exe if any
20445     new_path="${new_path/%.exe/}"
20446 
20447     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20448     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20449   fi
20450 
20451     else
20452       # We're on a unix platform. Hooray! :)
20453       # First separate the path from the arguments. This will split at the first
20454       # space.
20455       complete="$FOUND_MAKE"
20456       path="${complete%% *}"
20457       tmp="$complete EOL"
20458       arguments="${tmp#* }"
20459 
20460       # Cannot rely on the command "which" here since it doesn't always work.
20461       is_absolute_path=`$ECHO "$path" | $GREP ^/`
20462       if test -z "$is_absolute_path"; then
20463         # Path to executable is not absolute. Find it.
20464         IFS_save="$IFS"
20465         IFS=:
20466         for p in $PATH; do
20467           if test -f "$p/$path" && test -x "$p/$path"; then
20468             new_path="$p/$path"
20469             break
20470           fi
20471         done
20472         IFS="$IFS_save"
20473       else
20474         # This is an absolute path, we can use it without further modifications.
20475         new_path="$path"
20476       fi
20477 
20478       if test "x$new_path" = x; then
20479         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20480 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20481         has_space=`$ECHO "$complete" | $GREP " "`
20482         if test "x$has_space" != x; then
20483           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20484 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20485         fi
20486         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20487       fi
20488     fi
20489 
20490     # Now join together the path and the arguments once again
20491     if test "x$arguments" != xEOL; then
20492       new_complete="$new_path ${arguments% *}"
20493     else
20494       new_complete="$new_path"
20495     fi
20496 
20497     if test "x$complete" != "x$new_complete"; then
20498       FOUND_MAKE="$new_complete"
20499       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20500 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20501     fi
20502   fi
20503 
20504         fi
20505       fi
20506     fi
20507   fi
20508 
20509         if test "x$FOUND_MAKE" = x; then
20510           for ac_prog in make
20511 do
20512   # Extract the first word of "$ac_prog", so it can be a program name with args.
20513 set dummy $ac_prog; ac_word=$2
20514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20515 $as_echo_n "checking for $ac_word... " >&6; }
20516 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20517   $as_echo_n "(cached) " >&6
20518 else
20519   case $CHECK_TOOLSDIR_MAKE in
20520   [\\/]* | ?:[\\/]*)
20521   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20522   ;;
20523   *)
20524   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20525 for as_dir in $PATH
20526 do
20527   IFS=$as_save_IFS
20528   test -z "$as_dir" && as_dir=.
20529     for ac_exec_ext in '' $ac_executable_extensions; do
20530   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20531     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20532     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20533     break 2
20534   fi
20535 done
20536   done
20537 IFS=$as_save_IFS
20538 
20539   ;;
20540 esac
20541 fi
20542 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20543 if test -n "$CHECK_TOOLSDIR_MAKE"; then
20544   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20545 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20546 else
20547   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20548 $as_echo "no" >&6; }
20549 fi
20550 
20551 
20552   test -n "$CHECK_TOOLSDIR_MAKE" && break
20553 done
20554 
20555 
20556   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20557   DESCRIPTION="make in tools-dir"
20558 
20559   # On Cygwin, we require a newer version of make than on other platforms
20560   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20561     MAKE_VERSION_EXPR="-e 4\."
20562     MAKE_REQUIRED_VERSION="4.0"
20563    else
20564     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20565     MAKE_REQUIRED_VERSION="3.81"
20566   fi
20567 
20568   if test "x$MAKE_CANDIDATE" != x; then
20569     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20570 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20571     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20572     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20573     if test "x$IS_GNU_MAKE" = x; then
20574       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20575 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20576     else
20577       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20578       if test "x$IS_MODERN_MAKE" = x; then
20579         { $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
20580 $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;}
20581       else
20582         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20583           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20584             MAKE_EXPECTED_ENV='cygwin'
20585           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20586             MAKE_EXPECTED_ENV='msys'
20587           else
20588             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20589           fi
20590           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20591           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20592         else
20593           # Not relevant for non-Windows
20594           IS_MAKE_CORRECT_ENV=true
20595         fi
20596         if test "x$IS_MAKE_CORRECT_ENV" = x; then
20597           { $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
20598 $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;}
20599         else
20600           FOUND_MAKE=$MAKE_CANDIDATE
20601 
20602   # Only process if variable expands to non-empty
20603 
20604   if test "x$FOUND_MAKE" != x; then
20605     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20606 
20607   # First separate the path from the arguments. This will split at the first
20608   # space.
20609   complete="$FOUND_MAKE"
20610   path="${complete%% *}"
20611   tmp="$complete EOL"
20612   arguments="${tmp#* }"
20613 
20614   # Input might be given as Windows format, start by converting to
20615   # unix format.
20616   new_path=`$CYGPATH -u "$path"`
20617 
20618   # Now try to locate executable using which
20619   new_path=`$WHICH "$new_path" 2> /dev/null`
20620   # bat and cmd files are not always considered executable in cygwin causing which
20621   # to not find them
20622   if test "x$new_path" = x \
20623       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20624       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20625     new_path=`$CYGPATH -u "$path"`
20626   fi
20627   if test "x$new_path" = x; then
20628     # Oops. Which didn't find the executable.
20629     # The splitting of arguments from the executable at a space might have been incorrect,
20630     # since paths with space are more likely in Windows. Give it another try with the whole
20631     # argument.
20632     path="$complete"
20633     arguments="EOL"
20634     new_path=`$CYGPATH -u "$path"`
20635     new_path=`$WHICH "$new_path" 2> /dev/null`
20636     # bat and cmd files are not always considered executable in cygwin causing which
20637     # to not find them
20638     if test "x$new_path" = x \
20639         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20640         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20641       new_path=`$CYGPATH -u "$path"`
20642     fi
20643     if test "x$new_path" = x; then
20644       # It's still not found. Now this is an unrecoverable error.
20645       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20646 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20647       has_space=`$ECHO "$complete" | $GREP " "`
20648       if test "x$has_space" != x; then
20649         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20650 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20651       fi
20652       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20653     fi
20654   fi
20655 
20656   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20657   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20658   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20659   # "foo.exe" is OK but "foo" is an error.
20660   #
20661   # This test is therefore slightly more accurate than "test -f" to check for file presence.
20662   # It is also a way to make sure we got the proper file name for the real test later on.
20663   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20664   if test "x$test_shortpath" = x; then
20665     # Short path failed, file does not exist as specified.
20666     # Try adding .exe or .cmd
20667     if test -f "${new_path}.exe"; then
20668       input_to_shortpath="${new_path}.exe"
20669     elif test -f "${new_path}.cmd"; then
20670       input_to_shortpath="${new_path}.cmd"
20671     else
20672       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20673 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20674       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20675 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20676       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20677     fi
20678   else
20679     input_to_shortpath="$new_path"
20680   fi
20681 
20682   # Call helper function which possibly converts this using DOS-style short mode.
20683   # If so, the updated path is stored in $new_path.
20684   new_path="$input_to_shortpath"
20685 
20686   input_path="$input_to_shortpath"
20687   # Check if we need to convert this using DOS-style short mode. If the path
20688   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20689   # take no chances and rewrite it.
20690   # Note: m4 eats our [], so we need to use [ and ] instead.
20691   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20692   if test "x$has_forbidden_chars" != x; then
20693     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20694     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20695     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20696     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20697       # Going to short mode and back again did indeed matter. Since short mode is
20698       # case insensitive, let's make it lowercase to improve readability.
20699       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20700       # Now convert it back to Unix-style (cygpath)
20701       input_path=`$CYGPATH -u "$shortmode_path"`
20702       new_path="$input_path"
20703     fi
20704   fi
20705 
20706   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20707   if test "x$test_cygdrive_prefix" = x; then
20708     # As a simple fix, exclude /usr/bin since it's not a real path.
20709     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20710       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20711       # a path prefixed by /cygdrive for fixpath to work.
20712       new_path="$CYGWIN_ROOT_PATH$input_path"
20713     fi
20714   fi
20715 
20716   # remove trailing .exe if any
20717   new_path="${new_path/%.exe/}"
20718 
20719     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20720 
20721   # First separate the path from the arguments. This will split at the first
20722   # space.
20723   complete="$FOUND_MAKE"
20724   path="${complete%% *}"
20725   tmp="$complete EOL"
20726   arguments="${tmp#* }"
20727 
20728   # Input might be given as Windows format, start by converting to
20729   # unix format.
20730   new_path="$path"
20731 
20732   windows_path="$new_path"
20733   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20734     unix_path=`$CYGPATH -u "$windows_path"`
20735     new_path="$unix_path"
20736   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20737     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20738     new_path="$unix_path"
20739   fi
20740 
20741 
20742   # Now try to locate executable using which
20743   new_path=`$WHICH "$new_path" 2> /dev/null`
20744 
20745   if test "x$new_path" = x; then
20746     # Oops. Which didn't find the executable.
20747     # The splitting of arguments from the executable at a space might have been incorrect,
20748     # since paths with space are more likely in Windows. Give it another try with the whole
20749     # argument.
20750     path="$complete"
20751     arguments="EOL"
20752     new_path="$path"
20753 
20754   windows_path="$new_path"
20755   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20756     unix_path=`$CYGPATH -u "$windows_path"`
20757     new_path="$unix_path"
20758   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20759     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20760     new_path="$unix_path"
20761   fi
20762 
20763 
20764     new_path=`$WHICH "$new_path" 2> /dev/null`
20765     # bat and cmd files are not always considered executable in MSYS causing which
20766     # to not find them
20767     if test "x$new_path" = x \
20768         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20769         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20770       new_path="$path"
20771 
20772   windows_path="$new_path"
20773   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20774     unix_path=`$CYGPATH -u "$windows_path"`
20775     new_path="$unix_path"
20776   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20777     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20778     new_path="$unix_path"
20779   fi
20780 
20781     fi
20782 
20783     if test "x$new_path" = x; then
20784       # It's still not found. Now this is an unrecoverable error.
20785       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20786 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20787       has_space=`$ECHO "$complete" | $GREP " "`
20788       if test "x$has_space" != x; then
20789         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20790 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20791       fi
20792       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20793     fi
20794   fi
20795 
20796   # Now new_path has a complete unix path to the binary
20797   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20798     # Keep paths in /bin as-is, but remove trailing .exe if any
20799     new_path="${new_path/%.exe/}"
20800     # Do not save /bin paths to all_fixpath_prefixes!
20801   else
20802     # Not in mixed or Windows style, start by that.
20803     new_path=`cmd //c echo $new_path`
20804 
20805   input_path="$new_path"
20806   # Check if we need to convert this using DOS-style short mode. If the path
20807   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20808   # take no chances and rewrite it.
20809   # Note: m4 eats our [], so we need to use [ and ] instead.
20810   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20811   if test "x$has_forbidden_chars" != x; then
20812     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20813     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20814   fi
20815 
20816     # Output is in $new_path
20817 
20818   windows_path="$new_path"
20819   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20820     unix_path=`$CYGPATH -u "$windows_path"`
20821     new_path="$unix_path"
20822   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20823     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20824     new_path="$unix_path"
20825   fi
20826 
20827     # remove trailing .exe if any
20828     new_path="${new_path/%.exe/}"
20829 
20830     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20831     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20832   fi
20833 
20834     else
20835       # We're on a unix platform. Hooray! :)
20836       # First separate the path from the arguments. This will split at the first
20837       # space.
20838       complete="$FOUND_MAKE"
20839       path="${complete%% *}"
20840       tmp="$complete EOL"
20841       arguments="${tmp#* }"
20842 
20843       # Cannot rely on the command "which" here since it doesn't always work.
20844       is_absolute_path=`$ECHO "$path" | $GREP ^/`
20845       if test -z "$is_absolute_path"; then
20846         # Path to executable is not absolute. Find it.
20847         IFS_save="$IFS"
20848         IFS=:
20849         for p in $PATH; do
20850           if test -f "$p/$path" && test -x "$p/$path"; then
20851             new_path="$p/$path"
20852             break
20853           fi
20854         done
20855         IFS="$IFS_save"
20856       else
20857         # This is an absolute path, we can use it without further modifications.
20858         new_path="$path"
20859       fi
20860 
20861       if test "x$new_path" = x; then
20862         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20863 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20864         has_space=`$ECHO "$complete" | $GREP " "`
20865         if test "x$has_space" != x; then
20866           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20867 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20868         fi
20869         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20870       fi
20871     fi
20872 
20873     # Now join together the path and the arguments once again
20874     if test "x$arguments" != xEOL; then
20875       new_complete="$new_path ${arguments% *}"
20876     else
20877       new_complete="$new_path"
20878     fi
20879 
20880     if test "x$complete" != "x$new_complete"; then
20881       FOUND_MAKE="$new_complete"
20882       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20883 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20884     fi
20885   fi
20886 
20887         fi
20888       fi
20889     fi
20890   fi
20891 
20892         fi
20893         PATH=$OLD_PATH
20894       fi
20895     fi
20896 
20897     if test "x$FOUND_MAKE" = x; then
20898       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
20899     fi
20900 
20901     else
20902       # If it succeeded, then it was overridden by the user. We will use it
20903       # for the tool.
20904 
20905       # First remove it from the list of overridden variables, so we can test
20906       # for unknown variables in the end.
20907       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20908 
20909       # Check if we try to supply an empty value
20910       if test "x$MAKE" = x; then
20911         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20912 $as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20913         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20914 $as_echo_n "checking for MAKE... " >&6; }
20915         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20916 $as_echo "disabled" >&6; }
20917       else
20918         # Check if the provided tool contains a complete path.
20919         tool_specified="$MAKE"
20920         tool_basename="${tool_specified##*/}"
20921         if test "x$tool_basename" = "x$tool_specified"; then
20922           # A command without a complete path is provided, search $PATH.
20923           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20924 $as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20925           # Extract the first word of "$tool_basename", so it can be a program name with args.
20926 set dummy $tool_basename; ac_word=$2
20927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20928 $as_echo_n "checking for $ac_word... " >&6; }
20929 if ${ac_cv_path_MAKE+:} false; then :
20930   $as_echo_n "(cached) " >&6
20931 else
20932   case $MAKE in
20933   [\\/]* | ?:[\\/]*)
20934   ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20935   ;;
20936   *)
20937   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20938 for as_dir in $PATH
20939 do
20940   IFS=$as_save_IFS
20941   test -z "$as_dir" && as_dir=.
20942     for ac_exec_ext in '' $ac_executable_extensions; do
20943   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20944     ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20945     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20946     break 2
20947   fi
20948 done
20949   done
20950 IFS=$as_save_IFS
20951 
20952   ;;
20953 esac
20954 fi
20955 MAKE=$ac_cv_path_MAKE
20956 if test -n "$MAKE"; then
20957   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20958 $as_echo "$MAKE" >&6; }
20959 else
20960   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20961 $as_echo "no" >&6; }
20962 fi
20963 
20964 
20965           if test "x$MAKE" = x; then
20966             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20967           fi
20968         else
20969           # Otherwise we believe it is a complete path. Use it as it is.
20970           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20971 $as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20972           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20973 $as_echo_n "checking for MAKE... " >&6; }
20974           if test ! -x "$tool_specified"; then
20975             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20976 $as_echo "not found" >&6; }
20977             as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20978           fi
20979           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20980 $as_echo "$tool_specified" >&6; }
20981         fi
20982       fi
20983     fi
20984 
20985     # If MAKE was set by user, verify the version
20986 
20987   MAKE_CANDIDATE=""$MAKE""
20988   DESCRIPTION="user supplied MAKE=$MAKE"
20989 
20990   # On Cygwin, we require a newer version of make than on other platforms
20991   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20992     MAKE_VERSION_EXPR="-e 4\."
20993     MAKE_REQUIRED_VERSION="4.0"
20994    else
20995     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20996     MAKE_REQUIRED_VERSION="3.81"
20997   fi
20998 
20999   if test "x$MAKE_CANDIDATE" != x; then
21000     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
21001 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
21002     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
21003     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
21004     if test "x$IS_GNU_MAKE" = x; then
21005       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
21006 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
21007     else
21008       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
21009       if test "x$IS_MODERN_MAKE" = x; then
21010         { $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
21011 $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;}
21012       else
21013         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
21014           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21015             MAKE_EXPECTED_ENV='cygwin'
21016           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21017             MAKE_EXPECTED_ENV='msys'
21018           else
21019             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
21020           fi
21021           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
21022           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
21023         else
21024           # Not relevant for non-Windows
21025           IS_MAKE_CORRECT_ENV=true
21026         fi
21027         if test "x$IS_MAKE_CORRECT_ENV" = x; then
21028           { $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
21029 $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;}
21030         else
21031           FOUND_MAKE=$MAKE_CANDIDATE
21032 
21033   # Only process if variable expands to non-empty
21034 
21035   if test "x$FOUND_MAKE" != x; then
21036     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21037 
21038   # First separate the path from the arguments. This will split at the first
21039   # space.
21040   complete="$FOUND_MAKE"
21041   path="${complete%% *}"
21042   tmp="$complete EOL"
21043   arguments="${tmp#* }"
21044 
21045   # Input might be given as Windows format, start by converting to
21046   # unix format.
21047   new_path=`$CYGPATH -u "$path"`
21048 
21049   # Now try to locate executable using which
21050   new_path=`$WHICH "$new_path" 2> /dev/null`
21051   # bat and cmd files are not always considered executable in cygwin causing which
21052   # to not find them
21053   if test "x$new_path" = x \
21054       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21055       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21056     new_path=`$CYGPATH -u "$path"`
21057   fi
21058   if test "x$new_path" = x; then
21059     # Oops. Which didn't find the executable.
21060     # The splitting of arguments from the executable at a space might have been incorrect,
21061     # since paths with space are more likely in Windows. Give it another try with the whole
21062     # argument.
21063     path="$complete"
21064     arguments="EOL"
21065     new_path=`$CYGPATH -u "$path"`
21066     new_path=`$WHICH "$new_path" 2> /dev/null`
21067     # bat and cmd files are not always considered executable in cygwin causing which
21068     # to not find them
21069     if test "x$new_path" = x \
21070         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21071         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21072       new_path=`$CYGPATH -u "$path"`
21073     fi
21074     if test "x$new_path" = x; then
21075       # It's still not found. Now this is an unrecoverable error.
21076       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21077 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21078       has_space=`$ECHO "$complete" | $GREP " "`
21079       if test "x$has_space" != x; then
21080         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21081 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21082       fi
21083       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21084     fi
21085   fi
21086 
21087   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21088   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21089   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21090   # "foo.exe" is OK but "foo" is an error.
21091   #
21092   # This test is therefore slightly more accurate than "test -f" to check for file presence.
21093   # It is also a way to make sure we got the proper file name for the real test later on.
21094   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21095   if test "x$test_shortpath" = x; then
21096     # Short path failed, file does not exist as specified.
21097     # Try adding .exe or .cmd
21098     if test -f "${new_path}.exe"; then
21099       input_to_shortpath="${new_path}.exe"
21100     elif test -f "${new_path}.cmd"; then
21101       input_to_shortpath="${new_path}.cmd"
21102     else
21103       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
21104 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
21105       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21106 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21107       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21108     fi
21109   else
21110     input_to_shortpath="$new_path"
21111   fi
21112 
21113   # Call helper function which possibly converts this using DOS-style short mode.
21114   # If so, the updated path is stored in $new_path.
21115   new_path="$input_to_shortpath"
21116 
21117   input_path="$input_to_shortpath"
21118   # Check if we need to convert this using DOS-style short mode. If the path
21119   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21120   # take no chances and rewrite it.
21121   # Note: m4 eats our [], so we need to use [ and ] instead.
21122   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21123   if test "x$has_forbidden_chars" != x; then
21124     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21125     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21126     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21127     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21128       # Going to short mode and back again did indeed matter. Since short mode is
21129       # case insensitive, let's make it lowercase to improve readability.
21130       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21131       # Now convert it back to Unix-style (cygpath)
21132       input_path=`$CYGPATH -u "$shortmode_path"`
21133       new_path="$input_path"
21134     fi
21135   fi
21136 
21137   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21138   if test "x$test_cygdrive_prefix" = x; then
21139     # As a simple fix, exclude /usr/bin since it's not a real path.
21140     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21141       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21142       # a path prefixed by /cygdrive for fixpath to work.
21143       new_path="$CYGWIN_ROOT_PATH$input_path"
21144     fi
21145   fi
21146 
21147   # remove trailing .exe if any
21148   new_path="${new_path/%.exe/}"
21149 
21150     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21151 
21152   # First separate the path from the arguments. This will split at the first
21153   # space.
21154   complete="$FOUND_MAKE"
21155   path="${complete%% *}"
21156   tmp="$complete EOL"
21157   arguments="${tmp#* }"
21158 
21159   # Input might be given as Windows format, start by converting to
21160   # unix format.
21161   new_path="$path"
21162 
21163   windows_path="$new_path"
21164   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21165     unix_path=`$CYGPATH -u "$windows_path"`
21166     new_path="$unix_path"
21167   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21168     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21169     new_path="$unix_path"
21170   fi
21171 
21172 
21173   # Now try to locate executable using which
21174   new_path=`$WHICH "$new_path" 2> /dev/null`
21175 
21176   if test "x$new_path" = x; then
21177     # Oops. Which didn't find the executable.
21178     # The splitting of arguments from the executable at a space might have been incorrect,
21179     # since paths with space are more likely in Windows. Give it another try with the whole
21180     # argument.
21181     path="$complete"
21182     arguments="EOL"
21183     new_path="$path"
21184 
21185   windows_path="$new_path"
21186   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21187     unix_path=`$CYGPATH -u "$windows_path"`
21188     new_path="$unix_path"
21189   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21190     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21191     new_path="$unix_path"
21192   fi
21193 
21194 
21195     new_path=`$WHICH "$new_path" 2> /dev/null`
21196     # bat and cmd files are not always considered executable in MSYS causing which
21197     # to not find them
21198     if test "x$new_path" = x \
21199         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21200         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21201       new_path="$path"
21202 
21203   windows_path="$new_path"
21204   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21205     unix_path=`$CYGPATH -u "$windows_path"`
21206     new_path="$unix_path"
21207   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21208     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21209     new_path="$unix_path"
21210   fi
21211 
21212     fi
21213 
21214     if test "x$new_path" = x; then
21215       # It's still not found. Now this is an unrecoverable error.
21216       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21217 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21218       has_space=`$ECHO "$complete" | $GREP " "`
21219       if test "x$has_space" != x; then
21220         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21221 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21222       fi
21223       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21224     fi
21225   fi
21226 
21227   # Now new_path has a complete unix path to the binary
21228   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21229     # Keep paths in /bin as-is, but remove trailing .exe if any
21230     new_path="${new_path/%.exe/}"
21231     # Do not save /bin paths to all_fixpath_prefixes!
21232   else
21233     # Not in mixed or Windows style, start by that.
21234     new_path=`cmd //c echo $new_path`
21235 
21236   input_path="$new_path"
21237   # Check if we need to convert this using DOS-style short mode. If the path
21238   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21239   # take no chances and rewrite it.
21240   # Note: m4 eats our [], so we need to use [ and ] instead.
21241   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21242   if test "x$has_forbidden_chars" != x; then
21243     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21244     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21245   fi
21246 
21247     # Output is in $new_path
21248 
21249   windows_path="$new_path"
21250   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21251     unix_path=`$CYGPATH -u "$windows_path"`
21252     new_path="$unix_path"
21253   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21254     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21255     new_path="$unix_path"
21256   fi
21257 
21258     # remove trailing .exe if any
21259     new_path="${new_path/%.exe/}"
21260 
21261     # Save the first 10 bytes of this path to the storage, so fixpath can work.
21262     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21263   fi
21264 
21265     else
21266       # We're on a unix platform. Hooray! :)
21267       # First separate the path from the arguments. This will split at the first
21268       # space.
21269       complete="$FOUND_MAKE"
21270       path="${complete%% *}"
21271       tmp="$complete EOL"
21272       arguments="${tmp#* }"
21273 
21274       # Cannot rely on the command "which" here since it doesn't always work.
21275       is_absolute_path=`$ECHO "$path" | $GREP ^/`
21276       if test -z "$is_absolute_path"; then
21277         # Path to executable is not absolute. Find it.
21278         IFS_save="$IFS"
21279         IFS=:
21280         for p in $PATH; do
21281           if test -f "$p/$path" && test -x "$p/$path"; then
21282             new_path="$p/$path"
21283             break
21284           fi
21285         done
21286         IFS="$IFS_save"
21287       else
21288         # This is an absolute path, we can use it without further modifications.
21289         new_path="$path"
21290       fi
21291 
21292       if test "x$new_path" = x; then
21293         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21294 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21295         has_space=`$ECHO "$complete" | $GREP " "`
21296         if test "x$has_space" != x; then
21297           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21298 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21299         fi
21300         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21301       fi
21302     fi
21303 
21304     # Now join together the path and the arguments once again
21305     if test "x$arguments" != xEOL; then
21306       new_complete="$new_path ${arguments% *}"
21307     else
21308       new_complete="$new_path"
21309     fi
21310 
21311     if test "x$complete" != "x$new_complete"; then
21312       FOUND_MAKE="$new_complete"
21313       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21314 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21315     fi
21316   fi
21317 
21318         fi
21319       fi
21320     fi
21321   fi
21322 
21323     if test "x$FOUND_MAKE" = x; then
21324       as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21325     fi
21326 
21327   fi
21328 
21329 
21330   MAKE=$FOUND_MAKE
21331 
21332   { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21333 $as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21334 
21335 
21336   # Check if make supports the output sync option and if so, setup using it.
21337   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21338 $as_echo_n "checking if make --output-sync is supported... " >&6; }
21339   if $MAKE --version -O > /dev/null 2>&1; then
21340     OUTPUT_SYNC_SUPPORTED=true
21341     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21342 $as_echo "yes" >&6; }
21343     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21344 $as_echo_n "checking for output-sync value... " >&6; }
21345 
21346 # Check whether --with-output-sync was given.
21347 if test "${with_output_sync+set}" = set; then :
21348   withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21349 fi
21350 
21351     if test "x$OUTPUT_SYNC" = "x"; then
21352       OUTPUT_SYNC=none
21353     fi
21354     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21355 $as_echo "$OUTPUT_SYNC" >&6; }
21356     if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21357       as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21358     fi
21359   else
21360     OUTPUT_SYNC_SUPPORTED=false
21361     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21362 $as_echo "no" >&6; }
21363   fi
21364 
21365 
21366 
21367 
21368 
21369 
21370   # Test if find supports -delete
21371   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21372 $as_echo_n "checking if find supports -delete... " >&6; }
21373   FIND_DELETE="-delete"
21374 
21375   DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21376 
21377   echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21378 
21379   TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21380   if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21381     # No, it does not.
21382     $RM $DELETEDIR/TestIfFindSupportsDelete
21383     if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21384       # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21385       FIND_DELETE="-print | $XARGS $RM"
21386     else
21387       FIND_DELETE="-exec $RM \{\} \+"
21388     fi
21389     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21390 $as_echo "no" >&6; }
21391   else
21392     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21393 $as_echo "yes" >&6; }
21394   fi
21395   $RMDIR $DELETEDIR
21396 
21397 
21398 
21399   # Test which kind of tar was found
21400   if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21401     TAR_TYPE="gnu"
21402   elif test "x$($TAR --version | $GREP "bsdtar")" != "x"; then
21403     TAR_TYPE="bsd"
21404   elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21405     TAR_TYPE="bsd"
21406   elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21407     TAR_TYPE="solaris"
21408   fi
21409   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21410 $as_echo_n "checking what type of tar was found... " >&6; }
21411   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21412 $as_echo "$TAR_TYPE" >&6; }
21413 
21414   TAR_CREATE_FILE_PARAM=""
21415 
21416   if test "x$TAR_TYPE" = "xgnu"; then
21417     TAR_INCLUDE_PARAM="T"
21418     TAR_SUPPORTS_TRANSFORM="true"
21419     if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21420       # When using gnu tar for Solaris targets, need to use compatibility mode
21421       TAR_CREATE_EXTRA_PARAM="--format=ustar"
21422     fi
21423   else
21424     TAR_INCLUDE_PARAM="I"
21425     TAR_SUPPORTS_TRANSFORM="false"
21426   fi
21427 
21428 
21429 
21430 
21431 
21432 
21433   # Test that grep supports -Fx with a list of pattern which includes null pattern.
21434   # This is a problem for the grep resident on AIX.
21435   { $as_echo "$as_me:${as_lineno-$LINENO}: checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly" >&5
21436 $as_echo_n "checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly... " >&6; }
21437   # Multiple subsequent spaces..
21438   STACK_SPACES='aaa   bbb   ccc'
21439   # ..converted to subsequent newlines, causes STACK_LIST to be a list with some empty
21440   # patterns in it.
21441   STACK_LIST=${STACK_SPACES// /$'\n'}
21442   NEEDLE_SPACES='ccc bbb aaa'
21443   NEEDLE_LIST=${NEEDLE_SPACES// /$'\n'}
21444   RESULT="$($GREP -Fvx "$STACK_LIST" <<< "$NEEDLE_LIST")"
21445   if test "x$RESULT" == "x"; then
21446     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21447 $as_echo "yes" >&6; }
21448   else
21449     if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21450       ADDINFO="Please make sure you use GNU grep, usually found at /opt/freeware/bin."
21451     fi
21452     as_fn_error $? "grep does not handle -Fx correctly. ${ADDINFO}" "$LINENO" 5
21453   fi
21454 
21455 
21456   # These tools might not be installed by default,
21457   # need hint on how to install them.
21458 
21459 
21460 
21461   # Publish this variable in the help.
21462 
21463 
21464   if [ -z "${UNZIP+x}" ]; then
21465     # The variable is not set by user, try to locate tool using the code snippet
21466     for ac_prog in unzip
21467 do
21468   # Extract the first word of "$ac_prog", so it can be a program name with args.
21469 set dummy $ac_prog; ac_word=$2
21470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21471 $as_echo_n "checking for $ac_word... " >&6; }
21472 if ${ac_cv_path_UNZIP+:} false; then :
21473   $as_echo_n "(cached) " >&6
21474 else
21475   case $UNZIP in
21476   [\\/]* | ?:[\\/]*)
21477   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21478   ;;
21479   *)
21480   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21481 for as_dir in $PATH
21482 do
21483   IFS=$as_save_IFS
21484   test -z "$as_dir" && as_dir=.
21485     for ac_exec_ext in '' $ac_executable_extensions; do
21486   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21487     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21488     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21489     break 2
21490   fi
21491 done
21492   done
21493 IFS=$as_save_IFS
21494 
21495   ;;
21496 esac
21497 fi
21498 UNZIP=$ac_cv_path_UNZIP
21499 if test -n "$UNZIP"; then
21500   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21501 $as_echo "$UNZIP" >&6; }
21502 else
21503   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21504 $as_echo "no" >&6; }
21505 fi
21506 
21507 
21508   test -n "$UNZIP" && break
21509 done
21510 
21511   else
21512     # The variable is set, but is it from the command line or the environment?
21513 
21514     # Try to remove the string !UNZIP! from our list.
21515     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21516     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21517       # If it failed, the variable was not from the command line. Ignore it,
21518       # but warn the user (except for BASH, which is always set by the calling BASH).
21519       if test "xUNZIP" != xBASH; then
21520         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21521 $as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21522       fi
21523       # Try to locate tool using the code snippet
21524       for ac_prog in unzip
21525 do
21526   # Extract the first word of "$ac_prog", so it can be a program name with args.
21527 set dummy $ac_prog; ac_word=$2
21528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21529 $as_echo_n "checking for $ac_word... " >&6; }
21530 if ${ac_cv_path_UNZIP+:} false; then :
21531   $as_echo_n "(cached) " >&6
21532 else
21533   case $UNZIP in
21534   [\\/]* | ?:[\\/]*)
21535   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21536   ;;
21537   *)
21538   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21539 for as_dir in $PATH
21540 do
21541   IFS=$as_save_IFS
21542   test -z "$as_dir" && as_dir=.
21543     for ac_exec_ext in '' $ac_executable_extensions; do
21544   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21545     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21546     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21547     break 2
21548   fi
21549 done
21550   done
21551 IFS=$as_save_IFS
21552 
21553   ;;
21554 esac
21555 fi
21556 UNZIP=$ac_cv_path_UNZIP
21557 if test -n "$UNZIP"; then
21558   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21559 $as_echo "$UNZIP" >&6; }
21560 else
21561   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21562 $as_echo "no" >&6; }
21563 fi
21564 
21565 
21566   test -n "$UNZIP" && break
21567 done
21568 
21569     else
21570       # If it succeeded, then it was overridden by the user. We will use it
21571       # for the tool.
21572 
21573       # First remove it from the list of overridden variables, so we can test
21574       # for unknown variables in the end.
21575       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21576 
21577       # Check if we try to supply an empty value
21578       if test "x$UNZIP" = x; then
21579         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21580 $as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21581         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21582 $as_echo_n "checking for UNZIP... " >&6; }
21583         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21584 $as_echo "disabled" >&6; }
21585       else
21586         # Check if the provided tool contains a complete path.
21587         tool_specified="$UNZIP"
21588         tool_basename="${tool_specified##*/}"
21589         if test "x$tool_basename" = "x$tool_specified"; then
21590           # A command without a complete path is provided, search $PATH.
21591           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21592 $as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21593           # Extract the first word of "$tool_basename", so it can be a program name with args.
21594 set dummy $tool_basename; ac_word=$2
21595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21596 $as_echo_n "checking for $ac_word... " >&6; }
21597 if ${ac_cv_path_UNZIP+:} false; then :
21598   $as_echo_n "(cached) " >&6
21599 else
21600   case $UNZIP in
21601   [\\/]* | ?:[\\/]*)
21602   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21603   ;;
21604   *)
21605   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21606 for as_dir in $PATH
21607 do
21608   IFS=$as_save_IFS
21609   test -z "$as_dir" && as_dir=.
21610     for ac_exec_ext in '' $ac_executable_extensions; do
21611   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21612     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21613     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21614     break 2
21615   fi
21616 done
21617   done
21618 IFS=$as_save_IFS
21619 
21620   ;;
21621 esac
21622 fi
21623 UNZIP=$ac_cv_path_UNZIP
21624 if test -n "$UNZIP"; then
21625   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21626 $as_echo "$UNZIP" >&6; }
21627 else
21628   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21629 $as_echo "no" >&6; }
21630 fi
21631 
21632 
21633           if test "x$UNZIP" = x; then
21634             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21635           fi
21636         else
21637           # Otherwise we believe it is a complete path. Use it as it is.
21638           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21639 $as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21640           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21641 $as_echo_n "checking for UNZIP... " >&6; }
21642           if test ! -x "$tool_specified"; then
21643             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21644 $as_echo "not found" >&6; }
21645             as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21646           fi
21647           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21648 $as_echo "$tool_specified" >&6; }
21649         fi
21650       fi
21651     fi
21652 
21653   fi
21654 
21655 
21656 
21657   if test "x$UNZIP" = x; then
21658     as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21659   fi
21660 
21661 
21662   # Since zip uses "ZIP" as a environment variable for passing options, we need
21663   # to name our variable differently, hence ZIPEXE.
21664 
21665 
21666 
21667   # Publish this variable in the help.
21668 
21669 
21670   if [ -z "${ZIPEXE+x}" ]; then
21671     # The variable is not set by user, try to locate tool using the code snippet
21672     for ac_prog in zip
21673 do
21674   # Extract the first word of "$ac_prog", so it can be a program name with args.
21675 set dummy $ac_prog; ac_word=$2
21676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21677 $as_echo_n "checking for $ac_word... " >&6; }
21678 if ${ac_cv_path_ZIPEXE+:} false; then :
21679   $as_echo_n "(cached) " >&6
21680 else
21681   case $ZIPEXE in
21682   [\\/]* | ?:[\\/]*)
21683   ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21684   ;;
21685   *)
21686   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21687 for as_dir in $PATH
21688 do
21689   IFS=$as_save_IFS
21690   test -z "$as_dir" && as_dir=.
21691     for ac_exec_ext in '' $ac_executable_extensions; do
21692   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21693     ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21694     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21695     break 2
21696   fi
21697 done
21698   done
21699 IFS=$as_save_IFS
21700 
21701   ;;
21702 esac
21703 fi
21704 ZIPEXE=$ac_cv_path_ZIPEXE
21705 if test -n "$ZIPEXE"; then
21706   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21707 $as_echo "$ZIPEXE" >&6; }
21708 else
21709   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21710 $as_echo "no" >&6; }
21711 fi
21712 
21713 
21714   test -n "$ZIPEXE" && break
21715 done
21716 
21717   else
21718     # The variable is set, but is it from the command line or the environment?
21719 
21720     # Try to remove the string !ZIPEXE! from our list.
21721     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIPEXE!/}
21722     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21723       # If it failed, the variable was not from the command line. Ignore it,
21724       # but warn the user (except for BASH, which is always set by the calling BASH).
21725       if test "xZIPEXE" != xBASH; then
21726         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&5
21727 $as_echo "$as_me: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&2;}
21728       fi
21729       # Try to locate tool using the code snippet
21730       for ac_prog in zip
21731 do
21732   # Extract the first word of "$ac_prog", so it can be a program name with args.
21733 set dummy $ac_prog; ac_word=$2
21734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21735 $as_echo_n "checking for $ac_word... " >&6; }
21736 if ${ac_cv_path_ZIPEXE+:} false; then :
21737   $as_echo_n "(cached) " >&6
21738 else
21739   case $ZIPEXE in
21740   [\\/]* | ?:[\\/]*)
21741   ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21742   ;;
21743   *)
21744   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21745 for as_dir in $PATH
21746 do
21747   IFS=$as_save_IFS
21748   test -z "$as_dir" && as_dir=.
21749     for ac_exec_ext in '' $ac_executable_extensions; do
21750   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21751     ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21752     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21753     break 2
21754   fi
21755 done
21756   done
21757 IFS=$as_save_IFS
21758 
21759   ;;
21760 esac
21761 fi
21762 ZIPEXE=$ac_cv_path_ZIPEXE
21763 if test -n "$ZIPEXE"; then
21764   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21765 $as_echo "$ZIPEXE" >&6; }
21766 else
21767   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21768 $as_echo "no" >&6; }
21769 fi
21770 
21771 
21772   test -n "$ZIPEXE" && break
21773 done
21774 
21775     else
21776       # If it succeeded, then it was overridden by the user. We will use it
21777       # for the tool.
21778 
21779       # First remove it from the list of overridden variables, so we can test
21780       # for unknown variables in the end.
21781       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21782 
21783       # Check if we try to supply an empty value
21784       if test "x$ZIPEXE" = x; then
21785         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIPEXE= (no value)" >&5
21786 $as_echo "$as_me: Setting user supplied tool ZIPEXE= (no value)" >&6;}
21787         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21788 $as_echo_n "checking for ZIPEXE... " >&6; }
21789         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21790 $as_echo "disabled" >&6; }
21791       else
21792         # Check if the provided tool contains a complete path.
21793         tool_specified="$ZIPEXE"
21794         tool_basename="${tool_specified##*/}"
21795         if test "x$tool_basename" = "x$tool_specified"; then
21796           # A command without a complete path is provided, search $PATH.
21797           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIPEXE=$tool_basename" >&5
21798 $as_echo "$as_me: Will search for user supplied tool ZIPEXE=$tool_basename" >&6;}
21799           # Extract the first word of "$tool_basename", so it can be a program name with args.
21800 set dummy $tool_basename; ac_word=$2
21801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21802 $as_echo_n "checking for $ac_word... " >&6; }
21803 if ${ac_cv_path_ZIPEXE+:} false; then :
21804   $as_echo_n "(cached) " >&6
21805 else
21806   case $ZIPEXE in
21807   [\\/]* | ?:[\\/]*)
21808   ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21809   ;;
21810   *)
21811   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21812 for as_dir in $PATH
21813 do
21814   IFS=$as_save_IFS
21815   test -z "$as_dir" && as_dir=.
21816     for ac_exec_ext in '' $ac_executable_extensions; do
21817   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21818     ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21819     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21820     break 2
21821   fi
21822 done
21823   done
21824 IFS=$as_save_IFS
21825 
21826   ;;
21827 esac
21828 fi
21829 ZIPEXE=$ac_cv_path_ZIPEXE
21830 if test -n "$ZIPEXE"; then
21831   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21832 $as_echo "$ZIPEXE" >&6; }
21833 else
21834   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21835 $as_echo "no" >&6; }
21836 fi
21837 
21838 
21839           if test "x$ZIPEXE" = x; then
21840             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21841           fi
21842         else
21843           # Otherwise we believe it is a complete path. Use it as it is.
21844           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIPEXE=$tool_specified" >&5
21845 $as_echo "$as_me: Will use user supplied tool ZIPEXE=$tool_specified" >&6;}
21846           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21847 $as_echo_n "checking for ZIPEXE... " >&6; }
21848           if test ! -x "$tool_specified"; then
21849             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21850 $as_echo "not found" >&6; }
21851             as_fn_error $? "User supplied tool ZIPEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
21852           fi
21853           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21854 $as_echo "$tool_specified" >&6; }
21855         fi
21856       fi
21857     fi
21858 
21859   fi
21860 
21861 
21862 
21863   if test "x$ZIPEXE" = x; then
21864     as_fn_error $? "Could not find required tool for ZIPEXE" "$LINENO" 5
21865   fi
21866 
21867 
21868 
21869   # Non-required basic tools
21870 
21871 
21872 
21873   # Publish this variable in the help.
21874 
21875 
21876   if [ -z "${LDD+x}" ]; then
21877     # The variable is not set by user, try to locate tool using the code snippet
21878     for ac_prog in ldd
21879 do
21880   # Extract the first word of "$ac_prog", so it can be a program name with args.
21881 set dummy $ac_prog; ac_word=$2
21882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21883 $as_echo_n "checking for $ac_word... " >&6; }
21884 if ${ac_cv_path_LDD+:} false; then :
21885   $as_echo_n "(cached) " >&6
21886 else
21887   case $LDD in
21888   [\\/]* | ?:[\\/]*)
21889   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21890   ;;
21891   *)
21892   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21893 for as_dir in $PATH
21894 do
21895   IFS=$as_save_IFS
21896   test -z "$as_dir" && as_dir=.
21897     for ac_exec_ext in '' $ac_executable_extensions; do
21898   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21899     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21900     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21901     break 2
21902   fi
21903 done
21904   done
21905 IFS=$as_save_IFS
21906 
21907   ;;
21908 esac
21909 fi
21910 LDD=$ac_cv_path_LDD
21911 if test -n "$LDD"; then
21912   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21913 $as_echo "$LDD" >&6; }
21914 else
21915   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21916 $as_echo "no" >&6; }
21917 fi
21918 
21919 
21920   test -n "$LDD" && break
21921 done
21922 
21923   else
21924     # The variable is set, but is it from the command line or the environment?
21925 
21926     # Try to remove the string !LDD! from our list.
21927     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21928     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21929       # If it failed, the variable was not from the command line. Ignore it,
21930       # but warn the user (except for BASH, which is always set by the calling BASH).
21931       if test "xLDD" != xBASH; then
21932         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21933 $as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21934       fi
21935       # Try to locate tool using the code snippet
21936       for ac_prog in ldd
21937 do
21938   # Extract the first word of "$ac_prog", so it can be a program name with args.
21939 set dummy $ac_prog; ac_word=$2
21940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21941 $as_echo_n "checking for $ac_word... " >&6; }
21942 if ${ac_cv_path_LDD+:} false; then :
21943   $as_echo_n "(cached) " >&6
21944 else
21945   case $LDD in
21946   [\\/]* | ?:[\\/]*)
21947   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21948   ;;
21949   *)
21950   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21951 for as_dir in $PATH
21952 do
21953   IFS=$as_save_IFS
21954   test -z "$as_dir" && as_dir=.
21955     for ac_exec_ext in '' $ac_executable_extensions; do
21956   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21957     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21958     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21959     break 2
21960   fi
21961 done
21962   done
21963 IFS=$as_save_IFS
21964 
21965   ;;
21966 esac
21967 fi
21968 LDD=$ac_cv_path_LDD
21969 if test -n "$LDD"; then
21970   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21971 $as_echo "$LDD" >&6; }
21972 else
21973   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21974 $as_echo "no" >&6; }
21975 fi
21976 
21977 
21978   test -n "$LDD" && break
21979 done
21980 
21981     else
21982       # If it succeeded, then it was overridden by the user. We will use it
21983       # for the tool.
21984 
21985       # First remove it from the list of overridden variables, so we can test
21986       # for unknown variables in the end.
21987       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21988 
21989       # Check if we try to supply an empty value
21990       if test "x$LDD" = x; then
21991         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21992 $as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21993         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21994 $as_echo_n "checking for LDD... " >&6; }
21995         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21996 $as_echo "disabled" >&6; }
21997       else
21998         # Check if the provided tool contains a complete path.
21999         tool_specified="$LDD"
22000         tool_basename="${tool_specified##*/}"
22001         if test "x$tool_basename" = "x$tool_specified"; then
22002           # A command without a complete path is provided, search $PATH.
22003           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
22004 $as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
22005           # Extract the first word of "$tool_basename", so it can be a program name with args.
22006 set dummy $tool_basename; ac_word=$2
22007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22008 $as_echo_n "checking for $ac_word... " >&6; }
22009 if ${ac_cv_path_LDD+:} false; then :
22010   $as_echo_n "(cached) " >&6
22011 else
22012   case $LDD in
22013   [\\/]* | ?:[\\/]*)
22014   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
22015   ;;
22016   *)
22017   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22018 for as_dir in $PATH
22019 do
22020   IFS=$as_save_IFS
22021   test -z "$as_dir" && as_dir=.
22022     for ac_exec_ext in '' $ac_executable_extensions; do
22023   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22024     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
22025     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22026     break 2
22027   fi
22028 done
22029   done
22030 IFS=$as_save_IFS
22031 
22032   ;;
22033 esac
22034 fi
22035 LDD=$ac_cv_path_LDD
22036 if test -n "$LDD"; then
22037   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
22038 $as_echo "$LDD" >&6; }
22039 else
22040   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22041 $as_echo "no" >&6; }
22042 fi
22043 
22044 
22045           if test "x$LDD" = x; then
22046             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22047           fi
22048         else
22049           # Otherwise we believe it is a complete path. Use it as it is.
22050           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
22051 $as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
22052           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
22053 $as_echo_n "checking for LDD... " >&6; }
22054           if test ! -x "$tool_specified"; then
22055             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22056 $as_echo "not found" >&6; }
22057             as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
22058           fi
22059           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22060 $as_echo "$tool_specified" >&6; }
22061         fi
22062       fi
22063     fi
22064 
22065   fi
22066 
22067 
22068   if test "x$LDD" = "x"; then
22069     # List shared lib dependencies is used for
22070     # debug output and checking for forbidden dependencies.
22071     # We can build without it.
22072     LDD="true"
22073   fi
22074 
22075 
22076   # Publish this variable in the help.
22077 
22078 
22079   if [ -z "${OTOOL+x}" ]; then
22080     # The variable is not set by user, try to locate tool using the code snippet
22081     for ac_prog in otool
22082 do
22083   # Extract the first word of "$ac_prog", so it can be a program name with args.
22084 set dummy $ac_prog; ac_word=$2
22085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22086 $as_echo_n "checking for $ac_word... " >&6; }
22087 if ${ac_cv_path_OTOOL+:} false; then :
22088   $as_echo_n "(cached) " >&6
22089 else
22090   case $OTOOL in
22091   [\\/]* | ?:[\\/]*)
22092   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22093   ;;
22094   *)
22095   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22096 for as_dir in $PATH
22097 do
22098   IFS=$as_save_IFS
22099   test -z "$as_dir" && as_dir=.
22100     for ac_exec_ext in '' $ac_executable_extensions; do
22101   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22102     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22103     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22104     break 2
22105   fi
22106 done
22107   done
22108 IFS=$as_save_IFS
22109 
22110   ;;
22111 esac
22112 fi
22113 OTOOL=$ac_cv_path_OTOOL
22114 if test -n "$OTOOL"; then
22115   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22116 $as_echo "$OTOOL" >&6; }
22117 else
22118   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22119 $as_echo "no" >&6; }
22120 fi
22121 
22122 
22123   test -n "$OTOOL" && break
22124 done
22125 
22126   else
22127     # The variable is set, but is it from the command line or the environment?
22128 
22129     # Try to remove the string !OTOOL! from our list.
22130     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
22131     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22132       # If it failed, the variable was not from the command line. Ignore it,
22133       # but warn the user (except for BASH, which is always set by the calling BASH).
22134       if test "xOTOOL" != xBASH; then
22135         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
22136 $as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
22137       fi
22138       # Try to locate tool using the code snippet
22139       for ac_prog in otool
22140 do
22141   # Extract the first word of "$ac_prog", so it can be a program name with args.
22142 set dummy $ac_prog; ac_word=$2
22143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22144 $as_echo_n "checking for $ac_word... " >&6; }
22145 if ${ac_cv_path_OTOOL+:} false; then :
22146   $as_echo_n "(cached) " >&6
22147 else
22148   case $OTOOL in
22149   [\\/]* | ?:[\\/]*)
22150   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22151   ;;
22152   *)
22153   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22154 for as_dir in $PATH
22155 do
22156   IFS=$as_save_IFS
22157   test -z "$as_dir" && as_dir=.
22158     for ac_exec_ext in '' $ac_executable_extensions; do
22159   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22160     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22161     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22162     break 2
22163   fi
22164 done
22165   done
22166 IFS=$as_save_IFS
22167 
22168   ;;
22169 esac
22170 fi
22171 OTOOL=$ac_cv_path_OTOOL
22172 if test -n "$OTOOL"; then
22173   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22174 $as_echo "$OTOOL" >&6; }
22175 else
22176   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22177 $as_echo "no" >&6; }
22178 fi
22179 
22180 
22181   test -n "$OTOOL" && break
22182 done
22183 
22184     else
22185       # If it succeeded, then it was overridden by the user. We will use it
22186       # for the tool.
22187 
22188       # First remove it from the list of overridden variables, so we can test
22189       # for unknown variables in the end.
22190       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22191 
22192       # Check if we try to supply an empty value
22193       if test "x$OTOOL" = x; then
22194         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
22195 $as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
22196         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
22197 $as_echo_n "checking for OTOOL... " >&6; }
22198         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22199 $as_echo "disabled" >&6; }
22200       else
22201         # Check if the provided tool contains a complete path.
22202         tool_specified="$OTOOL"
22203         tool_basename="${tool_specified##*/}"
22204         if test "x$tool_basename" = "x$tool_specified"; then
22205           # A command without a complete path is provided, search $PATH.
22206           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
22207 $as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
22208           # Extract the first word of "$tool_basename", so it can be a program name with args.
22209 set dummy $tool_basename; ac_word=$2
22210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22211 $as_echo_n "checking for $ac_word... " >&6; }
22212 if ${ac_cv_path_OTOOL+:} false; then :
22213   $as_echo_n "(cached) " >&6
22214 else
22215   case $OTOOL in
22216   [\\/]* | ?:[\\/]*)
22217   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22218   ;;
22219   *)
22220   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22221 for as_dir in $PATH
22222 do
22223   IFS=$as_save_IFS
22224   test -z "$as_dir" && as_dir=.
22225     for ac_exec_ext in '' $ac_executable_extensions; do
22226   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22227     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22228     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22229     break 2
22230   fi
22231 done
22232   done
22233 IFS=$as_save_IFS
22234 
22235   ;;
22236 esac
22237 fi
22238 OTOOL=$ac_cv_path_OTOOL
22239 if test -n "$OTOOL"; then
22240   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22241 $as_echo "$OTOOL" >&6; }
22242 else
22243   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22244 $as_echo "no" >&6; }
22245 fi
22246 
22247 
22248           if test "x$OTOOL" = x; then
22249             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22250           fi
22251         else
22252           # Otherwise we believe it is a complete path. Use it as it is.
22253           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
22254 $as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
22255           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
22256 $as_echo_n "checking for OTOOL... " >&6; }
22257           if test ! -x "$tool_specified"; then
22258             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22259 $as_echo "not found" >&6; }
22260             as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
22261           fi
22262           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22263 $as_echo "$tool_specified" >&6; }
22264         fi
22265       fi
22266     fi
22267 
22268   fi
22269 
22270 
22271   if test "x$OTOOL" = "x"; then
22272     OTOOL="true"
22273   fi
22274 
22275 
22276   # Publish this variable in the help.
22277 
22278 
22279   if [ -z "${READELF+x}" ]; then
22280     # The variable is not set by user, try to locate tool using the code snippet
22281     for ac_prog in greadelf readelf
22282 do
22283   # Extract the first word of "$ac_prog", so it can be a program name with args.
22284 set dummy $ac_prog; ac_word=$2
22285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22286 $as_echo_n "checking for $ac_word... " >&6; }
22287 if ${ac_cv_path_READELF+:} false; then :
22288   $as_echo_n "(cached) " >&6
22289 else
22290   case $READELF in
22291   [\\/]* | ?:[\\/]*)
22292   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22293   ;;
22294   *)
22295   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22296 for as_dir in $PATH
22297 do
22298   IFS=$as_save_IFS
22299   test -z "$as_dir" && as_dir=.
22300     for ac_exec_ext in '' $ac_executable_extensions; do
22301   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22302     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22303     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22304     break 2
22305   fi
22306 done
22307   done
22308 IFS=$as_save_IFS
22309 
22310   ;;
22311 esac
22312 fi
22313 READELF=$ac_cv_path_READELF
22314 if test -n "$READELF"; then
22315   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22316 $as_echo "$READELF" >&6; }
22317 else
22318   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22319 $as_echo "no" >&6; }
22320 fi
22321 
22322 
22323   test -n "$READELF" && break
22324 done
22325 
22326   else
22327     # The variable is set, but is it from the command line or the environment?
22328 
22329     # Try to remove the string !READELF! from our list.
22330     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
22331     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22332       # If it failed, the variable was not from the command line. Ignore it,
22333       # but warn the user (except for BASH, which is always set by the calling BASH).
22334       if test "xREADELF" != xBASH; then
22335         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22336 $as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
22337       fi
22338       # Try to locate tool using the code snippet
22339       for ac_prog in greadelf readelf
22340 do
22341   # Extract the first word of "$ac_prog", so it can be a program name with args.
22342 set dummy $ac_prog; ac_word=$2
22343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22344 $as_echo_n "checking for $ac_word... " >&6; }
22345 if ${ac_cv_path_READELF+:} false; then :
22346   $as_echo_n "(cached) " >&6
22347 else
22348   case $READELF in
22349   [\\/]* | ?:[\\/]*)
22350   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22351   ;;
22352   *)
22353   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22354 for as_dir in $PATH
22355 do
22356   IFS=$as_save_IFS
22357   test -z "$as_dir" && as_dir=.
22358     for ac_exec_ext in '' $ac_executable_extensions; do
22359   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22360     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22361     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22362     break 2
22363   fi
22364 done
22365   done
22366 IFS=$as_save_IFS
22367 
22368   ;;
22369 esac
22370 fi
22371 READELF=$ac_cv_path_READELF
22372 if test -n "$READELF"; then
22373   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22374 $as_echo "$READELF" >&6; }
22375 else
22376   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22377 $as_echo "no" >&6; }
22378 fi
22379 
22380 
22381   test -n "$READELF" && break
22382 done
22383 
22384     else
22385       # If it succeeded, then it was overridden by the user. We will use it
22386       # for the tool.
22387 
22388       # First remove it from the list of overridden variables, so we can test
22389       # for unknown variables in the end.
22390       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22391 
22392       # Check if we try to supply an empty value
22393       if test "x$READELF" = x; then
22394         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22395 $as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22396         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22397 $as_echo_n "checking for READELF... " >&6; }
22398         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22399 $as_echo "disabled" >&6; }
22400       else
22401         # Check if the provided tool contains a complete path.
22402         tool_specified="$READELF"
22403         tool_basename="${tool_specified##*/}"
22404         if test "x$tool_basename" = "x$tool_specified"; then
22405           # A command without a complete path is provided, search $PATH.
22406           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
22407 $as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
22408           # Extract the first word of "$tool_basename", so it can be a program name with args.
22409 set dummy $tool_basename; ac_word=$2
22410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22411 $as_echo_n "checking for $ac_word... " >&6; }
22412 if ${ac_cv_path_READELF+:} false; then :
22413   $as_echo_n "(cached) " >&6
22414 else
22415   case $READELF in
22416   [\\/]* | ?:[\\/]*)
22417   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22418   ;;
22419   *)
22420   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22421 for as_dir in $PATH
22422 do
22423   IFS=$as_save_IFS
22424   test -z "$as_dir" && as_dir=.
22425     for ac_exec_ext in '' $ac_executable_extensions; do
22426   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22427     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22428     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22429     break 2
22430   fi
22431 done
22432   done
22433 IFS=$as_save_IFS
22434 
22435   ;;
22436 esac
22437 fi
22438 READELF=$ac_cv_path_READELF
22439 if test -n "$READELF"; then
22440   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22441 $as_echo "$READELF" >&6; }
22442 else
22443   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22444 $as_echo "no" >&6; }
22445 fi
22446 
22447 
22448           if test "x$READELF" = x; then
22449             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22450           fi
22451         else
22452           # Otherwise we believe it is a complete path. Use it as it is.
22453           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
22454 $as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22455           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22456 $as_echo_n "checking for READELF... " >&6; }
22457           if test ! -x "$tool_specified"; then
22458             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22459 $as_echo "not found" >&6; }
22460             as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22461           fi
22462           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22463 $as_echo "$tool_specified" >&6; }
22464         fi
22465       fi
22466     fi
22467 
22468   fi
22469 
22470 
22471 
22472 
22473   # Publish this variable in the help.
22474 
22475 
22476   if [ -z "${HG+x}" ]; then
22477     # The variable is not set by user, try to locate tool using the code snippet
22478     for ac_prog in hg
22479 do
22480   # Extract the first word of "$ac_prog", so it can be a program name with args.
22481 set dummy $ac_prog; ac_word=$2
22482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22483 $as_echo_n "checking for $ac_word... " >&6; }
22484 if ${ac_cv_path_HG+:} false; then :
22485   $as_echo_n "(cached) " >&6
22486 else
22487   case $HG in
22488   [\\/]* | ?:[\\/]*)
22489   ac_cv_path_HG="$HG" # Let the user override the test with a path.
22490   ;;
22491   *)
22492   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22493 for as_dir in $PATH
22494 do
22495   IFS=$as_save_IFS
22496   test -z "$as_dir" && as_dir=.
22497     for ac_exec_ext in '' $ac_executable_extensions; do
22498   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22499     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22500     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22501     break 2
22502   fi
22503 done
22504   done
22505 IFS=$as_save_IFS
22506 
22507   ;;
22508 esac
22509 fi
22510 HG=$ac_cv_path_HG
22511 if test -n "$HG"; then
22512   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22513 $as_echo "$HG" >&6; }
22514 else
22515   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22516 $as_echo "no" >&6; }
22517 fi
22518 
22519 
22520   test -n "$HG" && break
22521 done
22522 
22523   else
22524     # The variable is set, but is it from the command line or the environment?
22525 
22526     # Try to remove the string !HG! from our list.
22527     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
22528     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22529       # If it failed, the variable was not from the command line. Ignore it,
22530       # but warn the user (except for BASH, which is always set by the calling BASH).
22531       if test "xHG" != xBASH; then
22532         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22533 $as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
22534       fi
22535       # Try to locate tool using the code snippet
22536       for ac_prog in hg
22537 do
22538   # Extract the first word of "$ac_prog", so it can be a program name with args.
22539 set dummy $ac_prog; ac_word=$2
22540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22541 $as_echo_n "checking for $ac_word... " >&6; }
22542 if ${ac_cv_path_HG+:} false; then :
22543   $as_echo_n "(cached) " >&6
22544 else
22545   case $HG in
22546   [\\/]* | ?:[\\/]*)
22547   ac_cv_path_HG="$HG" # Let the user override the test with a path.
22548   ;;
22549   *)
22550   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22551 for as_dir in $PATH
22552 do
22553   IFS=$as_save_IFS
22554   test -z "$as_dir" && as_dir=.
22555     for ac_exec_ext in '' $ac_executable_extensions; do
22556   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22557     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22558     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22559     break 2
22560   fi
22561 done
22562   done
22563 IFS=$as_save_IFS
22564 
22565   ;;
22566 esac
22567 fi
22568 HG=$ac_cv_path_HG
22569 if test -n "$HG"; then
22570   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22571 $as_echo "$HG" >&6; }
22572 else
22573   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22574 $as_echo "no" >&6; }
22575 fi
22576 
22577 
22578   test -n "$HG" && break
22579 done
22580 
22581     else
22582       # If it succeeded, then it was overridden by the user. We will use it
22583       # for the tool.
22584 
22585       # First remove it from the list of overridden variables, so we can test
22586       # for unknown variables in the end.
22587       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22588 
22589       # Check if we try to supply an empty value
22590       if test "x$HG" = x; then
22591         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22592 $as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22593         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22594 $as_echo_n "checking for HG... " >&6; }
22595         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22596 $as_echo "disabled" >&6; }
22597       else
22598         # Check if the provided tool contains a complete path.
22599         tool_specified="$HG"
22600         tool_basename="${tool_specified##*/}"
22601         if test "x$tool_basename" = "x$tool_specified"; then
22602           # A command without a complete path is provided, search $PATH.
22603           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
22604 $as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
22605           # Extract the first word of "$tool_basename", so it can be a program name with args.
22606 set dummy $tool_basename; ac_word=$2
22607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22608 $as_echo_n "checking for $ac_word... " >&6; }
22609 if ${ac_cv_path_HG+:} false; then :
22610   $as_echo_n "(cached) " >&6
22611 else
22612   case $HG in
22613   [\\/]* | ?:[\\/]*)
22614   ac_cv_path_HG="$HG" # Let the user override the test with a path.
22615   ;;
22616   *)
22617   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22618 for as_dir in $PATH
22619 do
22620   IFS=$as_save_IFS
22621   test -z "$as_dir" && as_dir=.
22622     for ac_exec_ext in '' $ac_executable_extensions; do
22623   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22624     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22625     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22626     break 2
22627   fi
22628 done
22629   done
22630 IFS=$as_save_IFS
22631 
22632   ;;
22633 esac
22634 fi
22635 HG=$ac_cv_path_HG
22636 if test -n "$HG"; then
22637   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22638 $as_echo "$HG" >&6; }
22639 else
22640   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22641 $as_echo "no" >&6; }
22642 fi
22643 
22644 
22645           if test "x$HG" = x; then
22646             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22647           fi
22648         else
22649           # Otherwise we believe it is a complete path. Use it as it is.
22650           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
22651 $as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22652           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22653 $as_echo_n "checking for HG... " >&6; }
22654           if test ! -x "$tool_specified"; then
22655             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22656 $as_echo "not found" >&6; }
22657             as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
22658           fi
22659           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22660 $as_echo "$tool_specified" >&6; }
22661         fi
22662       fi
22663     fi
22664 
22665   fi
22666 
22667 
22668 
22669 
22670   # Publish this variable in the help.
22671 
22672 
22673   if [ -z "${STAT+x}" ]; then
22674     # The variable is not set by user, try to locate tool using the code snippet
22675     for ac_prog in stat
22676 do
22677   # Extract the first word of "$ac_prog", so it can be a program name with args.
22678 set dummy $ac_prog; ac_word=$2
22679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22680 $as_echo_n "checking for $ac_word... " >&6; }
22681 if ${ac_cv_path_STAT+:} false; then :
22682   $as_echo_n "(cached) " >&6
22683 else
22684   case $STAT in
22685   [\\/]* | ?:[\\/]*)
22686   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22687   ;;
22688   *)
22689   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22690 for as_dir in $PATH
22691 do
22692   IFS=$as_save_IFS
22693   test -z "$as_dir" && as_dir=.
22694     for ac_exec_ext in '' $ac_executable_extensions; do
22695   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22696     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22697     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22698     break 2
22699   fi
22700 done
22701   done
22702 IFS=$as_save_IFS
22703 
22704   ;;
22705 esac
22706 fi
22707 STAT=$ac_cv_path_STAT
22708 if test -n "$STAT"; then
22709   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22710 $as_echo "$STAT" >&6; }
22711 else
22712   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22713 $as_echo "no" >&6; }
22714 fi
22715 
22716 
22717   test -n "$STAT" && break
22718 done
22719 
22720   else
22721     # The variable is set, but is it from the command line or the environment?
22722 
22723     # Try to remove the string !STAT! from our list.
22724     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
22725     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22726       # If it failed, the variable was not from the command line. Ignore it,
22727       # but warn the user (except for BASH, which is always set by the calling BASH).
22728       if test "xSTAT" != xBASH; then
22729         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
22730 $as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
22731       fi
22732       # Try to locate tool using the code snippet
22733       for ac_prog in stat
22734 do
22735   # Extract the first word of "$ac_prog", so it can be a program name with args.
22736 set dummy $ac_prog; ac_word=$2
22737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22738 $as_echo_n "checking for $ac_word... " >&6; }
22739 if ${ac_cv_path_STAT+:} false; then :
22740   $as_echo_n "(cached) " >&6
22741 else
22742   case $STAT in
22743   [\\/]* | ?:[\\/]*)
22744   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22745   ;;
22746   *)
22747   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22748 for as_dir in $PATH
22749 do
22750   IFS=$as_save_IFS
22751   test -z "$as_dir" && as_dir=.
22752     for ac_exec_ext in '' $ac_executable_extensions; do
22753   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22754     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22755     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22756     break 2
22757   fi
22758 done
22759   done
22760 IFS=$as_save_IFS
22761 
22762   ;;
22763 esac
22764 fi
22765 STAT=$ac_cv_path_STAT
22766 if test -n "$STAT"; then
22767   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22768 $as_echo "$STAT" >&6; }
22769 else
22770   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22771 $as_echo "no" >&6; }
22772 fi
22773 
22774 
22775   test -n "$STAT" && break
22776 done
22777 
22778     else
22779       # If it succeeded, then it was overridden by the user. We will use it
22780       # for the tool.
22781 
22782       # First remove it from the list of overridden variables, so we can test
22783       # for unknown variables in the end.
22784       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22785 
22786       # Check if we try to supply an empty value
22787       if test "x$STAT" = x; then
22788         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22789 $as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22790         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22791 $as_echo_n "checking for STAT... " >&6; }
22792         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22793 $as_echo "disabled" >&6; }
22794       else
22795         # Check if the provided tool contains a complete path.
22796         tool_specified="$STAT"
22797         tool_basename="${tool_specified##*/}"
22798         if test "x$tool_basename" = "x$tool_specified"; then
22799           # A command without a complete path is provided, search $PATH.
22800           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
22801 $as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
22802           # Extract the first word of "$tool_basename", so it can be a program name with args.
22803 set dummy $tool_basename; ac_word=$2
22804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22805 $as_echo_n "checking for $ac_word... " >&6; }
22806 if ${ac_cv_path_STAT+:} false; then :
22807   $as_echo_n "(cached) " >&6
22808 else
22809   case $STAT in
22810   [\\/]* | ?:[\\/]*)
22811   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22812   ;;
22813   *)
22814   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22815 for as_dir in $PATH
22816 do
22817   IFS=$as_save_IFS
22818   test -z "$as_dir" && as_dir=.
22819     for ac_exec_ext in '' $ac_executable_extensions; do
22820   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22821     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22822     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22823     break 2
22824   fi
22825 done
22826   done
22827 IFS=$as_save_IFS
22828 
22829   ;;
22830 esac
22831 fi
22832 STAT=$ac_cv_path_STAT
22833 if test -n "$STAT"; then
22834   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22835 $as_echo "$STAT" >&6; }
22836 else
22837   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22838 $as_echo "no" >&6; }
22839 fi
22840 
22841 
22842           if test "x$STAT" = x; then
22843             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22844           fi
22845         else
22846           # Otherwise we believe it is a complete path. Use it as it is.
22847           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
22848 $as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
22849           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22850 $as_echo_n "checking for STAT... " >&6; }
22851           if test ! -x "$tool_specified"; then
22852             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22853 $as_echo "not found" >&6; }
22854             as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
22855           fi
22856           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22857 $as_echo "$tool_specified" >&6; }
22858         fi
22859       fi
22860     fi
22861 
22862   fi
22863 
22864 
22865 
22866 
22867   # Publish this variable in the help.
22868 
22869 
22870   if [ -z "${TIME+x}" ]; then
22871     # The variable is not set by user, try to locate tool using the code snippet
22872     for ac_prog in time
22873 do
22874   # Extract the first word of "$ac_prog", so it can be a program name with args.
22875 set dummy $ac_prog; ac_word=$2
22876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22877 $as_echo_n "checking for $ac_word... " >&6; }
22878 if ${ac_cv_path_TIME+:} false; then :
22879   $as_echo_n "(cached) " >&6
22880 else
22881   case $TIME in
22882   [\\/]* | ?:[\\/]*)
22883   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22884   ;;
22885   *)
22886   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22887 for as_dir in $PATH
22888 do
22889   IFS=$as_save_IFS
22890   test -z "$as_dir" && as_dir=.
22891     for ac_exec_ext in '' $ac_executable_extensions; do
22892   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22893     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22894     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22895     break 2
22896   fi
22897 done
22898   done
22899 IFS=$as_save_IFS
22900 
22901   ;;
22902 esac
22903 fi
22904 TIME=$ac_cv_path_TIME
22905 if test -n "$TIME"; then
22906   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22907 $as_echo "$TIME" >&6; }
22908 else
22909   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22910 $as_echo "no" >&6; }
22911 fi
22912 
22913 
22914   test -n "$TIME" && break
22915 done
22916 
22917   else
22918     # The variable is set, but is it from the command line or the environment?
22919 
22920     # Try to remove the string !TIME! from our list.
22921     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
22922     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22923       # If it failed, the variable was not from the command line. Ignore it,
22924       # but warn the user (except for BASH, which is always set by the calling BASH).
22925       if test "xTIME" != xBASH; then
22926         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
22927 $as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
22928       fi
22929       # Try to locate tool using the code snippet
22930       for ac_prog in time
22931 do
22932   # Extract the first word of "$ac_prog", so it can be a program name with args.
22933 set dummy $ac_prog; ac_word=$2
22934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22935 $as_echo_n "checking for $ac_word... " >&6; }
22936 if ${ac_cv_path_TIME+:} false; then :
22937   $as_echo_n "(cached) " >&6
22938 else
22939   case $TIME in
22940   [\\/]* | ?:[\\/]*)
22941   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22942   ;;
22943   *)
22944   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22945 for as_dir in $PATH
22946 do
22947   IFS=$as_save_IFS
22948   test -z "$as_dir" && as_dir=.
22949     for ac_exec_ext in '' $ac_executable_extensions; do
22950   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22951     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22952     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22953     break 2
22954   fi
22955 done
22956   done
22957 IFS=$as_save_IFS
22958 
22959   ;;
22960 esac
22961 fi
22962 TIME=$ac_cv_path_TIME
22963 if test -n "$TIME"; then
22964   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22965 $as_echo "$TIME" >&6; }
22966 else
22967   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22968 $as_echo "no" >&6; }
22969 fi
22970 
22971 
22972   test -n "$TIME" && break
22973 done
22974 
22975     else
22976       # If it succeeded, then it was overridden by the user. We will use it
22977       # for the tool.
22978 
22979       # First remove it from the list of overridden variables, so we can test
22980       # for unknown variables in the end.
22981       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22982 
22983       # Check if we try to supply an empty value
22984       if test "x$TIME" = x; then
22985         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
22986 $as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
22987         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22988 $as_echo_n "checking for TIME... " >&6; }
22989         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22990 $as_echo "disabled" >&6; }
22991       else
22992         # Check if the provided tool contains a complete path.
22993         tool_specified="$TIME"
22994         tool_basename="${tool_specified##*/}"
22995         if test "x$tool_basename" = "x$tool_specified"; then
22996           # A command without a complete path is provided, search $PATH.
22997           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
22998 $as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
22999           # Extract the first word of "$tool_basename", so it can be a program name with args.
23000 set dummy $tool_basename; ac_word=$2
23001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23002 $as_echo_n "checking for $ac_word... " >&6; }
23003 if ${ac_cv_path_TIME+:} false; then :
23004   $as_echo_n "(cached) " >&6
23005 else
23006   case $TIME in
23007   [\\/]* | ?:[\\/]*)
23008   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23009   ;;
23010   *)
23011   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23012 for as_dir in $PATH
23013 do
23014   IFS=$as_save_IFS
23015   test -z "$as_dir" && as_dir=.
23016     for ac_exec_ext in '' $ac_executable_extensions; do
23017   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23018     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23019     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23020     break 2
23021   fi
23022 done
23023   done
23024 IFS=$as_save_IFS
23025 
23026   ;;
23027 esac
23028 fi
23029 TIME=$ac_cv_path_TIME
23030 if test -n "$TIME"; then
23031   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23032 $as_echo "$TIME" >&6; }
23033 else
23034   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23035 $as_echo "no" >&6; }
23036 fi
23037 
23038 
23039           if test "x$TIME" = x; then
23040             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23041           fi
23042         else
23043           # Otherwise we believe it is a complete path. Use it as it is.
23044           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
23045 $as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
23046           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
23047 $as_echo_n "checking for TIME... " >&6; }
23048           if test ! -x "$tool_specified"; then
23049             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23050 $as_echo "not found" >&6; }
23051             as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
23052           fi
23053           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23054 $as_echo "$tool_specified" >&6; }
23055         fi
23056       fi
23057     fi
23058 
23059   fi
23060 
23061 
23062 
23063 
23064   # Publish this variable in the help.
23065 
23066 
23067   if [ -z "${FLOCK+x}" ]; then
23068     # The variable is not set by user, try to locate tool using the code snippet
23069     for ac_prog in flock
23070 do
23071   # Extract the first word of "$ac_prog", so it can be a program name with args.
23072 set dummy $ac_prog; ac_word=$2
23073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23074 $as_echo_n "checking for $ac_word... " >&6; }
23075 if ${ac_cv_path_FLOCK+:} false; then :
23076   $as_echo_n "(cached) " >&6
23077 else
23078   case $FLOCK in
23079   [\\/]* | ?:[\\/]*)
23080   ac_cv_path_FLOCK="$FLOCK" # Let the user override the test with a path.
23081   ;;
23082   *)
23083   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23084 for as_dir in $PATH
23085 do
23086   IFS=$as_save_IFS
23087   test -z "$as_dir" && as_dir=.
23088     for ac_exec_ext in '' $ac_executable_extensions; do
23089   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23090     ac_cv_path_FLOCK="$as_dir/$ac_word$ac_exec_ext"
23091     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23092     break 2
23093   fi
23094 done
23095   done
23096 IFS=$as_save_IFS
23097 
23098   ;;
23099 esac
23100 fi
23101 FLOCK=$ac_cv_path_FLOCK
23102 if test -n "$FLOCK"; then
23103   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLOCK" >&5
23104 $as_echo "$FLOCK" >&6; }
23105 else
23106   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23107 $as_echo "no" >&6; }
23108 fi
23109 
23110 
23111   test -n "$FLOCK" && break
23112 done
23113 
23114   else
23115     # The variable is set, but is it from the command line or the environment?
23116 
23117     # Try to remove the string !FLOCK! from our list.
23118     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FLOCK!/}
23119     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23120       # If it failed, the variable was not from the command line. Ignore it,
23121       # but warn the user (except for BASH, which is always set by the calling BASH).
23122       if test "xFLOCK" != xBASH; then
23123         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FLOCK from the environment. Use command line variables instead." >&5
23124 $as_echo "$as_me: WARNING: Ignoring value of FLOCK from the environment. Use command line variables instead." >&2;}
23125       fi
23126       # Try to locate tool using the code snippet
23127       for ac_prog in flock
23128 do
23129   # Extract the first word of "$ac_prog", so it can be a program name with args.
23130 set dummy $ac_prog; ac_word=$2
23131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23132 $as_echo_n "checking for $ac_word... " >&6; }
23133 if ${ac_cv_path_FLOCK+:} false; then :
23134   $as_echo_n "(cached) " >&6
23135 else
23136   case $FLOCK in
23137   [\\/]* | ?:[\\/]*)
23138   ac_cv_path_FLOCK="$FLOCK" # Let the user override the test with a path.
23139   ;;
23140   *)
23141   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23142 for as_dir in $PATH
23143 do
23144   IFS=$as_save_IFS
23145   test -z "$as_dir" && as_dir=.
23146     for ac_exec_ext in '' $ac_executable_extensions; do
23147   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23148     ac_cv_path_FLOCK="$as_dir/$ac_word$ac_exec_ext"
23149     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23150     break 2
23151   fi
23152 done
23153   done
23154 IFS=$as_save_IFS
23155 
23156   ;;
23157 esac
23158 fi
23159 FLOCK=$ac_cv_path_FLOCK
23160 if test -n "$FLOCK"; then
23161   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLOCK" >&5
23162 $as_echo "$FLOCK" >&6; }
23163 else
23164   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23165 $as_echo "no" >&6; }
23166 fi
23167 
23168 
23169   test -n "$FLOCK" && break
23170 done
23171 
23172     else
23173       # If it succeeded, then it was overridden by the user. We will use it
23174       # for the tool.
23175 
23176       # First remove it from the list of overridden variables, so we can test
23177       # for unknown variables in the end.
23178       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23179 
23180       # Check if we try to supply an empty value
23181       if test "x$FLOCK" = x; then
23182         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FLOCK= (no value)" >&5
23183 $as_echo "$as_me: Setting user supplied tool FLOCK= (no value)" >&6;}
23184         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FLOCK" >&5
23185 $as_echo_n "checking for FLOCK... " >&6; }
23186         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23187 $as_echo "disabled" >&6; }
23188       else
23189         # Check if the provided tool contains a complete path.
23190         tool_specified="$FLOCK"
23191         tool_basename="${tool_specified##*/}"
23192         if test "x$tool_basename" = "x$tool_specified"; then
23193           # A command without a complete path is provided, search $PATH.
23194           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FLOCK=$tool_basename" >&5
23195 $as_echo "$as_me: Will search for user supplied tool FLOCK=$tool_basename" >&6;}
23196           # Extract the first word of "$tool_basename", so it can be a program name with args.
23197 set dummy $tool_basename; ac_word=$2
23198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23199 $as_echo_n "checking for $ac_word... " >&6; }
23200 if ${ac_cv_path_FLOCK+:} false; then :
23201   $as_echo_n "(cached) " >&6
23202 else
23203   case $FLOCK in
23204   [\\/]* | ?:[\\/]*)
23205   ac_cv_path_FLOCK="$FLOCK" # Let the user override the test with a path.
23206   ;;
23207   *)
23208   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23209 for as_dir in $PATH
23210 do
23211   IFS=$as_save_IFS
23212   test -z "$as_dir" && as_dir=.
23213     for ac_exec_ext in '' $ac_executable_extensions; do
23214   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23215     ac_cv_path_FLOCK="$as_dir/$ac_word$ac_exec_ext"
23216     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23217     break 2
23218   fi
23219 done
23220   done
23221 IFS=$as_save_IFS
23222 
23223   ;;
23224 esac
23225 fi
23226 FLOCK=$ac_cv_path_FLOCK
23227 if test -n "$FLOCK"; then
23228   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLOCK" >&5
23229 $as_echo "$FLOCK" >&6; }
23230 else
23231   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23232 $as_echo "no" >&6; }
23233 fi
23234 
23235 
23236           if test "x$FLOCK" = x; then
23237             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23238           fi
23239         else
23240           # Otherwise we believe it is a complete path. Use it as it is.
23241           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FLOCK=$tool_specified" >&5
23242 $as_echo "$as_me: Will use user supplied tool FLOCK=$tool_specified" >&6;}
23243           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FLOCK" >&5
23244 $as_echo_n "checking for FLOCK... " >&6; }
23245           if test ! -x "$tool_specified"; then
23246             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23247 $as_echo "not found" >&6; }
23248             as_fn_error $? "User supplied tool FLOCK=$tool_specified does not exist or is not executable" "$LINENO" 5
23249           fi
23250           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23251 $as_echo "$tool_specified" >&6; }
23252         fi
23253       fi
23254     fi
23255 
23256   fi
23257 
23258 
23259   # Dtrace is usually found in /usr/sbin on Solaris, but that directory may not
23260   # be in the user path.
23261 
23262 
23263   # Publish this variable in the help.
23264 
23265 
23266   if [ -z "${DTRACE+x}" ]; then
23267     # The variable is not set by user, try to locate tool using the code snippet
23268     for ac_prog in dtrace
23269 do
23270   # Extract the first word of "$ac_prog", so it can be a program name with args.
23271 set dummy $ac_prog; ac_word=$2
23272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23273 $as_echo_n "checking for $ac_word... " >&6; }
23274 if ${ac_cv_path_DTRACE+:} false; then :
23275   $as_echo_n "(cached) " >&6
23276 else
23277   case $DTRACE in
23278   [\\/]* | ?:[\\/]*)
23279   ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23280   ;;
23281   *)
23282   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23283 as_dummy="$PATH:/usr/sbin"
23284 for as_dir in $as_dummy
23285 do
23286   IFS=$as_save_IFS
23287   test -z "$as_dir" && as_dir=.
23288     for ac_exec_ext in '' $ac_executable_extensions; do
23289   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23290     ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23291     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23292     break 2
23293   fi
23294 done
23295   done
23296 IFS=$as_save_IFS
23297 
23298   ;;
23299 esac
23300 fi
23301 DTRACE=$ac_cv_path_DTRACE
23302 if test -n "$DTRACE"; then
23303   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23304 $as_echo "$DTRACE" >&6; }
23305 else
23306   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23307 $as_echo "no" >&6; }
23308 fi
23309 
23310 
23311   test -n "$DTRACE" && break
23312 done
23313 
23314   else
23315     # The variable is set, but is it from the command line or the environment?
23316 
23317     # Try to remove the string !DTRACE! from our list.
23318     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
23319     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23320       # If it failed, the variable was not from the command line. Ignore it,
23321       # but warn the user (except for BASH, which is always set by the calling BASH).
23322       if test "xDTRACE" != xBASH; then
23323         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
23324 $as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
23325       fi
23326       # Try to locate tool using the code snippet
23327       for ac_prog in dtrace
23328 do
23329   # Extract the first word of "$ac_prog", so it can be a program name with args.
23330 set dummy $ac_prog; ac_word=$2
23331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23332 $as_echo_n "checking for $ac_word... " >&6; }
23333 if ${ac_cv_path_DTRACE+:} false; then :
23334   $as_echo_n "(cached) " >&6
23335 else
23336   case $DTRACE in
23337   [\\/]* | ?:[\\/]*)
23338   ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23339   ;;
23340   *)
23341   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23342 as_dummy="$PATH:/usr/sbin"
23343 for as_dir in $as_dummy
23344 do
23345   IFS=$as_save_IFS
23346   test -z "$as_dir" && as_dir=.
23347     for ac_exec_ext in '' $ac_executable_extensions; do
23348   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23349     ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23350     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23351     break 2
23352   fi
23353 done
23354   done
23355 IFS=$as_save_IFS
23356 
23357   ;;
23358 esac
23359 fi
23360 DTRACE=$ac_cv_path_DTRACE
23361 if test -n "$DTRACE"; then
23362   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23363 $as_echo "$DTRACE" >&6; }
23364 else
23365   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23366 $as_echo "no" >&6; }
23367 fi
23368 
23369 
23370   test -n "$DTRACE" && break
23371 done
23372 
23373     else
23374       # If it succeeded, then it was overridden by the user. We will use it
23375       # for the tool.
23376 
23377       # First remove it from the list of overridden variables, so we can test
23378       # for unknown variables in the end.
23379       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23380 
23381       # Check if we try to supply an empty value
23382       if test "x$DTRACE" = x; then
23383         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
23384 $as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
23385         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23386 $as_echo_n "checking for DTRACE... " >&6; }
23387         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23388 $as_echo "disabled" >&6; }
23389       else
23390         # Check if the provided tool contains a complete path.
23391         tool_specified="$DTRACE"
23392         tool_basename="${tool_specified##*/}"
23393         if test "x$tool_basename" = "x$tool_specified"; then
23394           # A command without a complete path is provided, search $PATH.
23395           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
23396 $as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
23397           # Extract the first word of "$tool_basename", so it can be a program name with args.
23398 set dummy $tool_basename; ac_word=$2
23399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23400 $as_echo_n "checking for $ac_word... " >&6; }
23401 if ${ac_cv_path_DTRACE+:} false; then :
23402   $as_echo_n "(cached) " >&6
23403 else
23404   case $DTRACE in
23405   [\\/]* | ?:[\\/]*)
23406   ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23407   ;;
23408   *)
23409   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23410 for as_dir in $PATH
23411 do
23412   IFS=$as_save_IFS
23413   test -z "$as_dir" && as_dir=.
23414     for ac_exec_ext in '' $ac_executable_extensions; do
23415   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23416     ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23417     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23418     break 2
23419   fi
23420 done
23421   done
23422 IFS=$as_save_IFS
23423 
23424   ;;
23425 esac
23426 fi
23427 DTRACE=$ac_cv_path_DTRACE
23428 if test -n "$DTRACE"; then
23429   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23430 $as_echo "$DTRACE" >&6; }
23431 else
23432   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23433 $as_echo "no" >&6; }
23434 fi
23435 
23436 
23437           if test "x$DTRACE" = x; then
23438             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23439           fi
23440         else
23441           # Otherwise we believe it is a complete path. Use it as it is.
23442           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
23443 $as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
23444           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23445 $as_echo_n "checking for DTRACE... " >&6; }
23446           if test ! -x "$tool_specified"; then
23447             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23448 $as_echo "not found" >&6; }
23449             as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
23450           fi
23451           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23452 $as_echo "$tool_specified" >&6; }
23453         fi
23454       fi
23455     fi
23456 
23457   fi
23458 
23459 
23460 
23461 
23462   # Publish this variable in the help.
23463 
23464 
23465   if [ -z "${PATCH+x}" ]; then
23466     # The variable is not set by user, try to locate tool using the code snippet
23467     for ac_prog in gpatch patch
23468 do
23469   # Extract the first word of "$ac_prog", so it can be a program name with args.
23470 set dummy $ac_prog; ac_word=$2
23471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23472 $as_echo_n "checking for $ac_word... " >&6; }
23473 if ${ac_cv_path_PATCH+:} false; then :
23474   $as_echo_n "(cached) " >&6
23475 else
23476   case $PATCH in
23477   [\\/]* | ?:[\\/]*)
23478   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23479   ;;
23480   *)
23481   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23482 for as_dir in $PATH
23483 do
23484   IFS=$as_save_IFS
23485   test -z "$as_dir" && as_dir=.
23486     for ac_exec_ext in '' $ac_executable_extensions; do
23487   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23488     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23489     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23490     break 2
23491   fi
23492 done
23493   done
23494 IFS=$as_save_IFS
23495 
23496   ;;
23497 esac
23498 fi
23499 PATCH=$ac_cv_path_PATCH
23500 if test -n "$PATCH"; then
23501   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23502 $as_echo "$PATCH" >&6; }
23503 else
23504   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23505 $as_echo "no" >&6; }
23506 fi
23507 
23508 
23509   test -n "$PATCH" && break
23510 done
23511 
23512   else
23513     # The variable is set, but is it from the command line or the environment?
23514 
23515     # Try to remove the string !PATCH! from our list.
23516     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23517     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23518       # If it failed, the variable was not from the command line. Ignore it,
23519       # but warn the user (except for BASH, which is always set by the calling BASH).
23520       if test "xPATCH" != xBASH; then
23521         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23522 $as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23523       fi
23524       # Try to locate tool using the code snippet
23525       for ac_prog in gpatch patch
23526 do
23527   # Extract the first word of "$ac_prog", so it can be a program name with args.
23528 set dummy $ac_prog; ac_word=$2
23529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23530 $as_echo_n "checking for $ac_word... " >&6; }
23531 if ${ac_cv_path_PATCH+:} false; then :
23532   $as_echo_n "(cached) " >&6
23533 else
23534   case $PATCH in
23535   [\\/]* | ?:[\\/]*)
23536   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23537   ;;
23538   *)
23539   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23540 for as_dir in $PATH
23541 do
23542   IFS=$as_save_IFS
23543   test -z "$as_dir" && as_dir=.
23544     for ac_exec_ext in '' $ac_executable_extensions; do
23545   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23546     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23547     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23548     break 2
23549   fi
23550 done
23551   done
23552 IFS=$as_save_IFS
23553 
23554   ;;
23555 esac
23556 fi
23557 PATCH=$ac_cv_path_PATCH
23558 if test -n "$PATCH"; then
23559   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23560 $as_echo "$PATCH" >&6; }
23561 else
23562   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23563 $as_echo "no" >&6; }
23564 fi
23565 
23566 
23567   test -n "$PATCH" && break
23568 done
23569 
23570     else
23571       # If it succeeded, then it was overridden by the user. We will use it
23572       # for the tool.
23573 
23574       # First remove it from the list of overridden variables, so we can test
23575       # for unknown variables in the end.
23576       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23577 
23578       # Check if we try to supply an empty value
23579       if test "x$PATCH" = x; then
23580         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23581 $as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23582         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23583 $as_echo_n "checking for PATCH... " >&6; }
23584         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23585 $as_echo "disabled" >&6; }
23586       else
23587         # Check if the provided tool contains a complete path.
23588         tool_specified="$PATCH"
23589         tool_basename="${tool_specified##*/}"
23590         if test "x$tool_basename" = "x$tool_specified"; then
23591           # A command without a complete path is provided, search $PATH.
23592           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23593 $as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23594           # Extract the first word of "$tool_basename", so it can be a program name with args.
23595 set dummy $tool_basename; ac_word=$2
23596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23597 $as_echo_n "checking for $ac_word... " >&6; }
23598 if ${ac_cv_path_PATCH+:} false; then :
23599   $as_echo_n "(cached) " >&6
23600 else
23601   case $PATCH in
23602   [\\/]* | ?:[\\/]*)
23603   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23604   ;;
23605   *)
23606   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23607 for as_dir in $PATH
23608 do
23609   IFS=$as_save_IFS
23610   test -z "$as_dir" && as_dir=.
23611     for ac_exec_ext in '' $ac_executable_extensions; do
23612   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23613     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23614     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23615     break 2
23616   fi
23617 done
23618   done
23619 IFS=$as_save_IFS
23620 
23621   ;;
23622 esac
23623 fi
23624 PATCH=$ac_cv_path_PATCH
23625 if test -n "$PATCH"; then
23626   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23627 $as_echo "$PATCH" >&6; }
23628 else
23629   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23630 $as_echo "no" >&6; }
23631 fi
23632 
23633 
23634           if test "x$PATCH" = x; then
23635             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23636           fi
23637         else
23638           # Otherwise we believe it is a complete path. Use it as it is.
23639           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23640 $as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23641           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23642 $as_echo_n "checking for PATCH... " >&6; }
23643           if test ! -x "$tool_specified"; then
23644             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23645 $as_echo "not found" >&6; }
23646             as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23647           fi
23648           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23649 $as_echo "$tool_specified" >&6; }
23650         fi
23651       fi
23652     fi
23653 
23654   fi
23655 
23656 
23657   # Check if it's GNU time
23658   IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23659   if test "x$IS_GNU_TIME" != x; then
23660     IS_GNU_TIME=yes
23661   else
23662     IS_GNU_TIME=no
23663   fi
23664 
23665 
23666   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23667 
23668 
23669 
23670   # Publish this variable in the help.
23671 
23672 
23673   if [ -z "${DSYMUTIL+x}" ]; then
23674     # The variable is not set by user, try to locate tool using the code snippet
23675     for ac_prog in dsymutil
23676 do
23677   # Extract the first word of "$ac_prog", so it can be a program name with args.
23678 set dummy $ac_prog; ac_word=$2
23679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23680 $as_echo_n "checking for $ac_word... " >&6; }
23681 if ${ac_cv_path_DSYMUTIL+:} false; then :
23682   $as_echo_n "(cached) " >&6
23683 else
23684   case $DSYMUTIL in
23685   [\\/]* | ?:[\\/]*)
23686   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23687   ;;
23688   *)
23689   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23690 for as_dir in $PATH
23691 do
23692   IFS=$as_save_IFS
23693   test -z "$as_dir" && as_dir=.
23694     for ac_exec_ext in '' $ac_executable_extensions; do
23695   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23696     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23697     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23698     break 2
23699   fi
23700 done
23701   done
23702 IFS=$as_save_IFS
23703 
23704   ;;
23705 esac
23706 fi
23707 DSYMUTIL=$ac_cv_path_DSYMUTIL
23708 if test -n "$DSYMUTIL"; then
23709   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23710 $as_echo "$DSYMUTIL" >&6; }
23711 else
23712   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23713 $as_echo "no" >&6; }
23714 fi
23715 
23716 
23717   test -n "$DSYMUTIL" && break
23718 done
23719 
23720   else
23721     # The variable is set, but is it from the command line or the environment?
23722 
23723     # Try to remove the string !DSYMUTIL! from our list.
23724     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
23725     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23726       # If it failed, the variable was not from the command line. Ignore it,
23727       # but warn the user (except for BASH, which is always set by the calling BASH).
23728       if test "xDSYMUTIL" != xBASH; then
23729         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
23730 $as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
23731       fi
23732       # Try to locate tool using the code snippet
23733       for ac_prog in dsymutil
23734 do
23735   # Extract the first word of "$ac_prog", so it can be a program name with args.
23736 set dummy $ac_prog; ac_word=$2
23737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23738 $as_echo_n "checking for $ac_word... " >&6; }
23739 if ${ac_cv_path_DSYMUTIL+:} false; then :
23740   $as_echo_n "(cached) " >&6
23741 else
23742   case $DSYMUTIL in
23743   [\\/]* | ?:[\\/]*)
23744   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23745   ;;
23746   *)
23747   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23748 for as_dir in $PATH
23749 do
23750   IFS=$as_save_IFS
23751   test -z "$as_dir" && as_dir=.
23752     for ac_exec_ext in '' $ac_executable_extensions; do
23753   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23754     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23755     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23756     break 2
23757   fi
23758 done
23759   done
23760 IFS=$as_save_IFS
23761 
23762   ;;
23763 esac
23764 fi
23765 DSYMUTIL=$ac_cv_path_DSYMUTIL
23766 if test -n "$DSYMUTIL"; then
23767   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23768 $as_echo "$DSYMUTIL" >&6; }
23769 else
23770   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23771 $as_echo "no" >&6; }
23772 fi
23773 
23774 
23775   test -n "$DSYMUTIL" && break
23776 done
23777 
23778     else
23779       # If it succeeded, then it was overridden by the user. We will use it
23780       # for the tool.
23781 
23782       # First remove it from the list of overridden variables, so we can test
23783       # for unknown variables in the end.
23784       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23785 
23786       # Check if we try to supply an empty value
23787       if test "x$DSYMUTIL" = x; then
23788         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
23789 $as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
23790         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23791 $as_echo_n "checking for DSYMUTIL... " >&6; }
23792         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23793 $as_echo "disabled" >&6; }
23794       else
23795         # Check if the provided tool contains a complete path.
23796         tool_specified="$DSYMUTIL"
23797         tool_basename="${tool_specified##*/}"
23798         if test "x$tool_basename" = "x$tool_specified"; then
23799           # A command without a complete path is provided, search $PATH.
23800           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
23801 $as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
23802           # Extract the first word of "$tool_basename", so it can be a program name with args.
23803 set dummy $tool_basename; ac_word=$2
23804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23805 $as_echo_n "checking for $ac_word... " >&6; }
23806 if ${ac_cv_path_DSYMUTIL+:} false; then :
23807   $as_echo_n "(cached) " >&6
23808 else
23809   case $DSYMUTIL in
23810   [\\/]* | ?:[\\/]*)
23811   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23812   ;;
23813   *)
23814   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23815 for as_dir in $PATH
23816 do
23817   IFS=$as_save_IFS
23818   test -z "$as_dir" && as_dir=.
23819     for ac_exec_ext in '' $ac_executable_extensions; do
23820   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23821     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23822     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23823     break 2
23824   fi
23825 done
23826   done
23827 IFS=$as_save_IFS
23828 
23829   ;;
23830 esac
23831 fi
23832 DSYMUTIL=$ac_cv_path_DSYMUTIL
23833 if test -n "$DSYMUTIL"; then
23834   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23835 $as_echo "$DSYMUTIL" >&6; }
23836 else
23837   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23838 $as_echo "no" >&6; }
23839 fi
23840 
23841 
23842           if test "x$DSYMUTIL" = x; then
23843             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23844           fi
23845         else
23846           # Otherwise we believe it is a complete path. Use it as it is.
23847           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
23848 $as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
23849           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23850 $as_echo_n "checking for DSYMUTIL... " >&6; }
23851           if test ! -x "$tool_specified"; then
23852             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23853 $as_echo "not found" >&6; }
23854             as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
23855           fi
23856           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23857 $as_echo "$tool_specified" >&6; }
23858         fi
23859       fi
23860     fi
23861 
23862   fi
23863 
23864 
23865 
23866   if test "x$DSYMUTIL" = x; then
23867     as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
23868   fi
23869 
23870 
23871 
23872 
23873 
23874   # Publish this variable in the help.
23875 
23876 
23877   if [ -z "${XATTR+x}" ]; then
23878     # The variable is not set by user, try to locate tool using the code snippet
23879     for ac_prog in xattr
23880 do
23881   # Extract the first word of "$ac_prog", so it can be a program name with args.
23882 set dummy $ac_prog; ac_word=$2
23883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23884 $as_echo_n "checking for $ac_word... " >&6; }
23885 if ${ac_cv_path_XATTR+:} false; then :
23886   $as_echo_n "(cached) " >&6
23887 else
23888   case $XATTR in
23889   [\\/]* | ?:[\\/]*)
23890   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23891   ;;
23892   *)
23893   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23894 for as_dir in $PATH
23895 do
23896   IFS=$as_save_IFS
23897   test -z "$as_dir" && as_dir=.
23898     for ac_exec_ext in '' $ac_executable_extensions; do
23899   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23900     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23901     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23902     break 2
23903   fi
23904 done
23905   done
23906 IFS=$as_save_IFS
23907 
23908   ;;
23909 esac
23910 fi
23911 XATTR=$ac_cv_path_XATTR
23912 if test -n "$XATTR"; then
23913   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23914 $as_echo "$XATTR" >&6; }
23915 else
23916   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23917 $as_echo "no" >&6; }
23918 fi
23919 
23920 
23921   test -n "$XATTR" && break
23922 done
23923 
23924   else
23925     # The variable is set, but is it from the command line or the environment?
23926 
23927     # Try to remove the string !XATTR! from our list.
23928     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
23929     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23930       # If it failed, the variable was not from the command line. Ignore it,
23931       # but warn the user (except for BASH, which is always set by the calling BASH).
23932       if test "xXATTR" != xBASH; then
23933         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
23934 $as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
23935       fi
23936       # Try to locate tool using the code snippet
23937       for ac_prog in xattr
23938 do
23939   # Extract the first word of "$ac_prog", so it can be a program name with args.
23940 set dummy $ac_prog; ac_word=$2
23941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23942 $as_echo_n "checking for $ac_word... " >&6; }
23943 if ${ac_cv_path_XATTR+:} false; then :
23944   $as_echo_n "(cached) " >&6
23945 else
23946   case $XATTR in
23947   [\\/]* | ?:[\\/]*)
23948   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23949   ;;
23950   *)
23951   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23952 for as_dir in $PATH
23953 do
23954   IFS=$as_save_IFS
23955   test -z "$as_dir" && as_dir=.
23956     for ac_exec_ext in '' $ac_executable_extensions; do
23957   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23958     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23959     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23960     break 2
23961   fi
23962 done
23963   done
23964 IFS=$as_save_IFS
23965 
23966   ;;
23967 esac
23968 fi
23969 XATTR=$ac_cv_path_XATTR
23970 if test -n "$XATTR"; then
23971   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23972 $as_echo "$XATTR" >&6; }
23973 else
23974   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23975 $as_echo "no" >&6; }
23976 fi
23977 
23978 
23979   test -n "$XATTR" && break
23980 done
23981 
23982     else
23983       # If it succeeded, then it was overridden by the user. We will use it
23984       # for the tool.
23985 
23986       # First remove it from the list of overridden variables, so we can test
23987       # for unknown variables in the end.
23988       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23989 
23990       # Check if we try to supply an empty value
23991       if test "x$XATTR" = x; then
23992         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
23993 $as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
23994         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23995 $as_echo_n "checking for XATTR... " >&6; }
23996         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23997 $as_echo "disabled" >&6; }
23998       else
23999         # Check if the provided tool contains a complete path.
24000         tool_specified="$XATTR"
24001         tool_basename="${tool_specified##*/}"
24002         if test "x$tool_basename" = "x$tool_specified"; then
24003           # A command without a complete path is provided, search $PATH.
24004           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
24005 $as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
24006           # Extract the first word of "$tool_basename", so it can be a program name with args.
24007 set dummy $tool_basename; ac_word=$2
24008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24009 $as_echo_n "checking for $ac_word... " >&6; }
24010 if ${ac_cv_path_XATTR+:} false; then :
24011   $as_echo_n "(cached) " >&6
24012 else
24013   case $XATTR in
24014   [\\/]* | ?:[\\/]*)
24015   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
24016   ;;
24017   *)
24018   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24019 for as_dir in $PATH
24020 do
24021   IFS=$as_save_IFS
24022   test -z "$as_dir" && as_dir=.
24023     for ac_exec_ext in '' $ac_executable_extensions; do
24024   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24025     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
24026     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24027     break 2
24028   fi
24029 done
24030   done
24031 IFS=$as_save_IFS
24032 
24033   ;;
24034 esac
24035 fi
24036 XATTR=$ac_cv_path_XATTR
24037 if test -n "$XATTR"; then
24038   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
24039 $as_echo "$XATTR" >&6; }
24040 else
24041   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24042 $as_echo "no" >&6; }
24043 fi
24044 
24045 
24046           if test "x$XATTR" = x; then
24047             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24048           fi
24049         else
24050           # Otherwise we believe it is a complete path. Use it as it is.
24051           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
24052 $as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
24053           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
24054 $as_echo_n "checking for XATTR... " >&6; }
24055           if test ! -x "$tool_specified"; then
24056             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24057 $as_echo "not found" >&6; }
24058             as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
24059           fi
24060           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24061 $as_echo "$tool_specified" >&6; }
24062         fi
24063       fi
24064     fi
24065 
24066   fi
24067 
24068 
24069 
24070   if test "x$XATTR" = x; then
24071     as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
24072   fi
24073 
24074 
24075 
24076 
24077   # Publish this variable in the help.
24078 
24079 
24080   if [ -z "${CODESIGN+x}" ]; then
24081     # The variable is not set by user, try to locate tool using the code snippet
24082     for ac_prog in codesign
24083 do
24084   # Extract the first word of "$ac_prog", so it can be a program name with args.
24085 set dummy $ac_prog; ac_word=$2
24086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24087 $as_echo_n "checking for $ac_word... " >&6; }
24088 if ${ac_cv_path_CODESIGN+:} false; then :
24089   $as_echo_n "(cached) " >&6
24090 else
24091   case $CODESIGN in
24092   [\\/]* | ?:[\\/]*)
24093   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24094   ;;
24095   *)
24096   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24097 for as_dir in $PATH
24098 do
24099   IFS=$as_save_IFS
24100   test -z "$as_dir" && as_dir=.
24101     for ac_exec_ext in '' $ac_executable_extensions; do
24102   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24103     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24104     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24105     break 2
24106   fi
24107 done
24108   done
24109 IFS=$as_save_IFS
24110 
24111   ;;
24112 esac
24113 fi
24114 CODESIGN=$ac_cv_path_CODESIGN
24115 if test -n "$CODESIGN"; then
24116   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24117 $as_echo "$CODESIGN" >&6; }
24118 else
24119   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24120 $as_echo "no" >&6; }
24121 fi
24122 
24123 
24124   test -n "$CODESIGN" && break
24125 done
24126 
24127   else
24128     # The variable is set, but is it from the command line or the environment?
24129 
24130     # Try to remove the string !CODESIGN! from our list.
24131     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
24132     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24133       # If it failed, the variable was not from the command line. Ignore it,
24134       # but warn the user (except for BASH, which is always set by the calling BASH).
24135       if test "xCODESIGN" != xBASH; then
24136         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
24137 $as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
24138       fi
24139       # Try to locate tool using the code snippet
24140       for ac_prog in codesign
24141 do
24142   # Extract the first word of "$ac_prog", so it can be a program name with args.
24143 set dummy $ac_prog; ac_word=$2
24144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24145 $as_echo_n "checking for $ac_word... " >&6; }
24146 if ${ac_cv_path_CODESIGN+:} false; then :
24147   $as_echo_n "(cached) " >&6
24148 else
24149   case $CODESIGN in
24150   [\\/]* | ?:[\\/]*)
24151   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24152   ;;
24153   *)
24154   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24155 for as_dir in $PATH
24156 do
24157   IFS=$as_save_IFS
24158   test -z "$as_dir" && as_dir=.
24159     for ac_exec_ext in '' $ac_executable_extensions; do
24160   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24161     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24162     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24163     break 2
24164   fi
24165 done
24166   done
24167 IFS=$as_save_IFS
24168 
24169   ;;
24170 esac
24171 fi
24172 CODESIGN=$ac_cv_path_CODESIGN
24173 if test -n "$CODESIGN"; then
24174   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24175 $as_echo "$CODESIGN" >&6; }
24176 else
24177   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24178 $as_echo "no" >&6; }
24179 fi
24180 
24181 
24182   test -n "$CODESIGN" && break
24183 done
24184 
24185     else
24186       # If it succeeded, then it was overridden by the user. We will use it
24187       # for the tool.
24188 
24189       # First remove it from the list of overridden variables, so we can test
24190       # for unknown variables in the end.
24191       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24192 
24193       # Check if we try to supply an empty value
24194       if test "x$CODESIGN" = x; then
24195         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
24196 $as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
24197         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
24198 $as_echo_n "checking for CODESIGN... " >&6; }
24199         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24200 $as_echo "disabled" >&6; }
24201       else
24202         # Check if the provided tool contains a complete path.
24203         tool_specified="$CODESIGN"
24204         tool_basename="${tool_specified##*/}"
24205         if test "x$tool_basename" = "x$tool_specified"; then
24206           # A command without a complete path is provided, search $PATH.
24207           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
24208 $as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
24209           # Extract the first word of "$tool_basename", so it can be a program name with args.
24210 set dummy $tool_basename; ac_word=$2
24211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24212 $as_echo_n "checking for $ac_word... " >&6; }
24213 if ${ac_cv_path_CODESIGN+:} false; then :
24214   $as_echo_n "(cached) " >&6
24215 else
24216   case $CODESIGN in
24217   [\\/]* | ?:[\\/]*)
24218   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24219   ;;
24220   *)
24221   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24222 for as_dir in $PATH
24223 do
24224   IFS=$as_save_IFS
24225   test -z "$as_dir" && as_dir=.
24226     for ac_exec_ext in '' $ac_executable_extensions; do
24227   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24228     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24229     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24230     break 2
24231   fi
24232 done
24233   done
24234 IFS=$as_save_IFS
24235 
24236   ;;
24237 esac
24238 fi
24239 CODESIGN=$ac_cv_path_CODESIGN
24240 if test -n "$CODESIGN"; then
24241   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24242 $as_echo "$CODESIGN" >&6; }
24243 else
24244   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24245 $as_echo "no" >&6; }
24246 fi
24247 
24248 
24249           if test "x$CODESIGN" = x; then
24250             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24251           fi
24252         else
24253           # Otherwise we believe it is a complete path. Use it as it is.
24254           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
24255 $as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
24256           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
24257 $as_echo_n "checking for CODESIGN... " >&6; }
24258           if test ! -x "$tool_specified"; then
24259             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24260 $as_echo "not found" >&6; }
24261             as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
24262           fi
24263           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24264 $as_echo "$tool_specified" >&6; }
24265         fi
24266       fi
24267     fi
24268 
24269   fi
24270 
24271 
24272     if test "x$CODESIGN" != "x"; then
24273       # Verify that the openjdk_codesign certificate is present
24274       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
24275 $as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
24276       $RM codesign-testfile
24277       $TOUCH codesign-testfile
24278       $CODESIGN -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
24279       $RM codesign-testfile
24280       if test "x$CODESIGN" = x; then
24281         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24282 $as_echo "no" >&6; }
24283       else
24284         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24285 $as_echo "yes" >&6; }
24286       fi
24287     fi
24288 
24289 
24290 
24291   # Publish this variable in the help.
24292 
24293 
24294   if [ -z "${SETFILE+x}" ]; then
24295     # The variable is not set by user, try to locate tool using the code snippet
24296     for ac_prog in SetFile
24297 do
24298   # Extract the first word of "$ac_prog", so it can be a program name with args.
24299 set dummy $ac_prog; ac_word=$2
24300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24301 $as_echo_n "checking for $ac_word... " >&6; }
24302 if ${ac_cv_path_SETFILE+:} false; then :
24303   $as_echo_n "(cached) " >&6
24304 else
24305   case $SETFILE in
24306   [\\/]* | ?:[\\/]*)
24307   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24308   ;;
24309   *)
24310   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24311 for as_dir in $PATH
24312 do
24313   IFS=$as_save_IFS
24314   test -z "$as_dir" && as_dir=.
24315     for ac_exec_ext in '' $ac_executable_extensions; do
24316   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24317     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24318     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24319     break 2
24320   fi
24321 done
24322   done
24323 IFS=$as_save_IFS
24324 
24325   ;;
24326 esac
24327 fi
24328 SETFILE=$ac_cv_path_SETFILE
24329 if test -n "$SETFILE"; then
24330   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24331 $as_echo "$SETFILE" >&6; }
24332 else
24333   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24334 $as_echo "no" >&6; }
24335 fi
24336 
24337 
24338   test -n "$SETFILE" && break
24339 done
24340 
24341   else
24342     # The variable is set, but is it from the command line or the environment?
24343 
24344     # Try to remove the string !SETFILE! from our list.
24345     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
24346     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24347       # If it failed, the variable was not from the command line. Ignore it,
24348       # but warn the user (except for BASH, which is always set by the calling BASH).
24349       if test "xSETFILE" != xBASH; then
24350         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
24351 $as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
24352       fi
24353       # Try to locate tool using the code snippet
24354       for ac_prog in SetFile
24355 do
24356   # Extract the first word of "$ac_prog", so it can be a program name with args.
24357 set dummy $ac_prog; ac_word=$2
24358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24359 $as_echo_n "checking for $ac_word... " >&6; }
24360 if ${ac_cv_path_SETFILE+:} false; then :
24361   $as_echo_n "(cached) " >&6
24362 else
24363   case $SETFILE in
24364   [\\/]* | ?:[\\/]*)
24365   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24366   ;;
24367   *)
24368   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24369 for as_dir in $PATH
24370 do
24371   IFS=$as_save_IFS
24372   test -z "$as_dir" && as_dir=.
24373     for ac_exec_ext in '' $ac_executable_extensions; do
24374   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24375     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24376     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24377     break 2
24378   fi
24379 done
24380   done
24381 IFS=$as_save_IFS
24382 
24383   ;;
24384 esac
24385 fi
24386 SETFILE=$ac_cv_path_SETFILE
24387 if test -n "$SETFILE"; then
24388   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24389 $as_echo "$SETFILE" >&6; }
24390 else
24391   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24392 $as_echo "no" >&6; }
24393 fi
24394 
24395 
24396   test -n "$SETFILE" && break
24397 done
24398 
24399     else
24400       # If it succeeded, then it was overridden by the user. We will use it
24401       # for the tool.
24402 
24403       # First remove it from the list of overridden variables, so we can test
24404       # for unknown variables in the end.
24405       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24406 
24407       # Check if we try to supply an empty value
24408       if test "x$SETFILE" = x; then
24409         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
24410 $as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
24411         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24412 $as_echo_n "checking for SETFILE... " >&6; }
24413         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24414 $as_echo "disabled" >&6; }
24415       else
24416         # Check if the provided tool contains a complete path.
24417         tool_specified="$SETFILE"
24418         tool_basename="${tool_specified##*/}"
24419         if test "x$tool_basename" = "x$tool_specified"; then
24420           # A command without a complete path is provided, search $PATH.
24421           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
24422 $as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
24423           # Extract the first word of "$tool_basename", so it can be a program name with args.
24424 set dummy $tool_basename; ac_word=$2
24425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24426 $as_echo_n "checking for $ac_word... " >&6; }
24427 if ${ac_cv_path_SETFILE+:} false; then :
24428   $as_echo_n "(cached) " >&6
24429 else
24430   case $SETFILE in
24431   [\\/]* | ?:[\\/]*)
24432   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24433   ;;
24434   *)
24435   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24436 for as_dir in $PATH
24437 do
24438   IFS=$as_save_IFS
24439   test -z "$as_dir" && as_dir=.
24440     for ac_exec_ext in '' $ac_executable_extensions; do
24441   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24442     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24443     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24444     break 2
24445   fi
24446 done
24447   done
24448 IFS=$as_save_IFS
24449 
24450   ;;
24451 esac
24452 fi
24453 SETFILE=$ac_cv_path_SETFILE
24454 if test -n "$SETFILE"; then
24455   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24456 $as_echo "$SETFILE" >&6; }
24457 else
24458   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24459 $as_echo "no" >&6; }
24460 fi
24461 
24462 
24463           if test "x$SETFILE" = x; then
24464             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24465           fi
24466         else
24467           # Otherwise we believe it is a complete path. Use it as it is.
24468           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
24469 $as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
24470           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24471 $as_echo_n "checking for SETFILE... " >&6; }
24472           if test ! -x "$tool_specified"; then
24473             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24474 $as_echo "not found" >&6; }
24475             as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
24476           fi
24477           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24478 $as_echo "$tool_specified" >&6; }
24479         fi
24480       fi
24481     fi
24482 
24483   fi
24484 
24485 
24486 
24487   if test "x$SETFILE" = x; then
24488     as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
24489   fi
24490 
24491 
24492   fi
24493 
24494 
24495   # Check bash version
24496   # Extra [ ] to stop m4 mangling
24497    BASH_VER=`$BASH --version | $SED -n  -e 's/^.*bash.*ersion *\([0-9.]*\).*$/\1/ p'`
24498   { $as_echo "$as_me:${as_lineno-$LINENO}: checking bash version" >&5
24499 $as_echo_n "checking bash version... " >&6; }
24500   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH_VER" >&5
24501 $as_echo "$BASH_VER" >&6; }
24502 
24503   BASH_MAJOR=`$ECHO $BASH_VER | $CUT -d . -f 1`
24504   BASH_MINOR=`$ECHO $BASH_VER | $CUT -d . -f 2`
24505   if test $BASH_MAJOR -lt 3 || (test $BASH_MAJOR -eq 3 && test $BASH_MINOR -lt 2); then
24506     as_fn_error $? "bash version 3.2 or better is required" "$LINENO" 5
24507   fi
24508 
24509   # Test if bash supports pipefail.
24510   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24511 $as_echo_n "checking if bash supports pipefail... " >&6; }
24512   if ${BASH} -c 'set -o pipefail'; then
24513     BASH_ARGS="$BASH_ARGS -o pipefail"
24514     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24515 $as_echo "yes" >&6; }
24516   else
24517     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24518 $as_echo "no" >&6; }
24519   fi
24520 
24521   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24522 $as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24523   if ${BASH} -e -c 'true'; then
24524     BASH_ARGS="$BASH_ARGS -e"
24525     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24526 $as_echo "yes" >&6; }
24527   else
24528     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24529 $as_echo "no" >&6; }
24530   fi
24531 
24532 
24533 
24534 
24535 # Check if pkg-config is available.
24536 
24537 
24538 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24539         if test -n "$ac_tool_prefix"; then
24540   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24541 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24543 $as_echo_n "checking for $ac_word... " >&6; }
24544 if ${ac_cv_path_PKG_CONFIG+:} false; then :
24545   $as_echo_n "(cached) " >&6
24546 else
24547   case $PKG_CONFIG in
24548   [\\/]* | ?:[\\/]*)
24549   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24550   ;;
24551   *)
24552   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24553 for as_dir in $PATH
24554 do
24555   IFS=$as_save_IFS
24556   test -z "$as_dir" && as_dir=.
24557     for ac_exec_ext in '' $ac_executable_extensions; do
24558   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24559     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24560     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24561     break 2
24562   fi
24563 done
24564   done
24565 IFS=$as_save_IFS
24566 
24567   ;;
24568 esac
24569 fi
24570 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24571 if test -n "$PKG_CONFIG"; then
24572   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24573 $as_echo "$PKG_CONFIG" >&6; }
24574 else
24575   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24576 $as_echo "no" >&6; }
24577 fi
24578 
24579 
24580 fi
24581 if test -z "$ac_cv_path_PKG_CONFIG"; then
24582   ac_pt_PKG_CONFIG=$PKG_CONFIG
24583   # Extract the first word of "pkg-config", so it can be a program name with args.
24584 set dummy pkg-config; ac_word=$2
24585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24586 $as_echo_n "checking for $ac_word... " >&6; }
24587 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24588   $as_echo_n "(cached) " >&6
24589 else
24590   case $ac_pt_PKG_CONFIG in
24591   [\\/]* | ?:[\\/]*)
24592   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24593   ;;
24594   *)
24595   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24596 for as_dir in $PATH
24597 do
24598   IFS=$as_save_IFS
24599   test -z "$as_dir" && as_dir=.
24600     for ac_exec_ext in '' $ac_executable_extensions; do
24601   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24602     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24603     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24604     break 2
24605   fi
24606 done
24607   done
24608 IFS=$as_save_IFS
24609 
24610   ;;
24611 esac
24612 fi
24613 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24614 if test -n "$ac_pt_PKG_CONFIG"; then
24615   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24616 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
24617 else
24618   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24619 $as_echo "no" >&6; }
24620 fi
24621 
24622   if test "x$ac_pt_PKG_CONFIG" = x; then
24623     PKG_CONFIG=""
24624   else
24625     case $cross_compiling:$ac_tool_warned in
24626 yes:)
24627 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24628 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24629 ac_tool_warned=yes ;;
24630 esac
24631     PKG_CONFIG=$ac_pt_PKG_CONFIG
24632   fi
24633 else
24634   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24635 fi
24636 
24637 fi
24638 if test -n "$PKG_CONFIG"; then
24639         _pkg_min_version=0.9.0
24640         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24641 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24642         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24643                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24644 $as_echo "yes" >&6; }
24645         else
24646                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24647 $as_echo "no" >&6; }
24648                 PKG_CONFIG=""
24649         fi
24650 
24651 fi
24652 
24653 # After basic tools have been setup, we can check build os specific details.
24654 
24655   ###############################################################################
24656 
24657   # Note that this is the build platform OS version!
24658 
24659   OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24660   OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24661   OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24662   OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24663 
24664 
24665 
24666 
24667 
24668 # Misc basic settings
24669 
24670 
24671 # Check whether --with-default-make-target was given.
24672 if test "${with_default_make_target+set}" = set; then :
24673   withval=$with_default_make_target;
24674 fi
24675 
24676   if test "x$with_default_make_target" = "x" \
24677       || test "x$with_default_make_target" = "xyes"; then
24678     DEFAULT_MAKE_TARGET="exploded-image"
24679   elif test "x$with_default_make_target" = "xno"; then
24680     as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24681   else
24682     DEFAULT_MAKE_TARGET="$with_default_make_target"
24683   fi
24684 
24685 
24686 
24687 
24688 ###############################################################################
24689 #
24690 # Determine OpenJDK variants, options and version numbers.
24691 #
24692 ###############################################################################
24693 
24694 # We need build & target for this.
24695 
24696   # Should we build a JDK without a graphical UI?
24697   { $as_echo "$as_me:${as_lineno-$LINENO}: checking headless only" >&5
24698 $as_echo_n "checking headless only... " >&6; }
24699   # Check whether --enable-headless-only was given.
24700 if test "${enable_headless_only+set}" = set; then :
24701   enableval=$enable_headless_only;
24702 fi
24703 
24704 
24705   if test "x$enable_headless_only" = "xyes"; then
24706     ENABLE_HEADLESS_ONLY="true"
24707     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24708 $as_echo "yes" >&6; }
24709   elif test "x$enable_headless_only" = "xno"; then
24710     ENABLE_HEADLESS_ONLY="false"
24711     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24712 $as_echo "no" >&6; }
24713   elif test "x$enable_headless_only" = "x"; then
24714     ENABLE_HEADLESS_ONLY="false"
24715     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24716 $as_echo "no" >&6; }
24717   else
24718     as_fn_error $? "--enable-headless-only can only take yes or no" "$LINENO" 5
24719   fi
24720 
24721 
24722 
24723   # Choose cacerts source file
24724 
24725 # Check whether --with-cacerts-file was given.
24726 if test "${with_cacerts_file+set}" = set; then :
24727   withval=$with_cacerts_file;
24728 fi
24729 
24730   if test "x$with_cacerts_file" != x; then
24731     CACERTS_FILE=$with_cacerts_file
24732   fi
24733 
24734 
24735   # Enable or disable unlimited crypto
24736   # Check whether --enable-unlimited-crypto was given.
24737 if test "${enable_unlimited_crypto+set}" = set; then :
24738   enableval=$enable_unlimited_crypto;
24739 else
24740   enable_unlimited_crypto=yes
24741 fi
24742 
24743   if test "x$enable_unlimited_crypto" = "xyes"; then
24744     UNLIMITED_CRYPTO=true
24745   else
24746     UNLIMITED_CRYPTO=false
24747   fi
24748 
24749 
24750   # Should we build the serviceability agent (SA)?
24751   INCLUDE_SA=true
24752   if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
24753     INCLUDE_SA=false
24754   fi
24755   if test "x$OPENJDK_TARGET_OS" = xaix ; then
24756     INCLUDE_SA=false
24757   fi
24758 
24759 
24760   # Compress jars
24761   COMPRESS_JARS=false
24762 
24763 
24764 
24765   # Setup default copyright year. Mostly overridden when building close to a new year.
24766 
24767 # Check whether --with-copyright-year was given.
24768 if test "${with_copyright_year+set}" = set; then :
24769   withval=$with_copyright_year;
24770 fi
24771 
24772   if test "x$with_copyright_year" = xyes; then
24773     as_fn_error $? "Copyright year must have a value" "$LINENO" 5
24774   elif test "x$with_copyright_year" != x; then
24775     COPYRIGHT_YEAR="$with_copyright_year"
24776   else
24777     COPYRIGHT_YEAR=`$DATE +'%Y'`
24778   fi
24779 
24780 
24781 
24782   # Check whether --enable-keep-packaged-modules was given.
24783 if test "${enable_keep_packaged_modules+set}" = set; then :
24784   enableval=$enable_keep_packaged_modules;
24785 fi
24786 
24787 
24788   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24789 $as_echo_n "checking if packaged modules are kept... " >&6; }
24790   if test "x$enable_keep_packaged_modules" = "xyes"; then
24791     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24792 $as_echo "yes" >&6; }
24793     JLINK_KEEP_PACKAGED_MODULES=true
24794   elif test "x$enable_keep_packaged_modules" = "xno"; then
24795     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24796 $as_echo "no" >&6; }
24797     JLINK_KEEP_PACKAGED_MODULES=false
24798   elif test "x$enable_keep_packaged_modules" = "x"; then
24799     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
24800 $as_echo "yes (default)" >&6; }
24801     JLINK_KEEP_PACKAGED_MODULES=true
24802   else
24803     { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5
24804 $as_echo "error" >&6; }
24805     as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
24806   fi
24807 
24808 
24809 
24810 
24811   # Warn user that old version arguments are deprecated.
24812 
24813 
24814 # Check whether --with-milestone was given.
24815 if test "${with_milestone+set}" = set; then :
24816   withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
24817 $as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
24818 fi
24819 
24820 
24821 
24822 
24823 # Check whether --with-update-version was given.
24824 if test "${with_update_version+set}" = set; then :
24825   withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
24826 $as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
24827 fi
24828 
24829 
24830 
24831 
24832 # Check whether --with-user-release-suffix was given.
24833 if test "${with_user_release_suffix+set}" = set; then :
24834   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
24835 $as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
24836 fi
24837 
24838 
24839 
24840 
24841 # Check whether --with-build-number was given.
24842 if test "${with_build_number+set}" = set; then :
24843   withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
24844 $as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
24845 fi
24846 
24847 
24848 
24849   # Source the version numbers file
24850   . $AUTOCONF_DIR/version-numbers
24851 
24852   # Some non-version number information is set in that file
24853 
24854 
24855 
24856 
24857 
24858 
24859 
24860 
24861 
24862   # Override version from arguments
24863 
24864   # If --with-version-string is set, process it first. It is possible to
24865   # override parts with more specific flags, since these are processed later.
24866 
24867 # Check whether --with-version-string was given.
24868 if test "${with_version_string+set}" = set; then :
24869   withval=$with_version_string;
24870 fi
24871 
24872   if test "x$with_version_string" = xyes; then
24873     as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
24874   elif test "x$with_version_string" != x; then
24875     # Additional [] needed to keep m4 from mangling shell constructs.
24876     if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
24877       VERSION_MAJOR=${BASH_REMATCH[1]}
24878       VERSION_MINOR=${BASH_REMATCH[3]}
24879       VERSION_SECURITY=${BASH_REMATCH[5]}
24880       VERSION_PATCH=${BASH_REMATCH[7]}
24881       VERSION_PRE=${BASH_REMATCH[9]}
24882       version_plus_separator=${BASH_REMATCH[11]}
24883       VERSION_BUILD=${BASH_REMATCH[12]}
24884       VERSION_OPT=${BASH_REMATCH[14]}
24885       # Unspecified numerical fields are interpreted as 0.
24886       if test "x$VERSION_MINOR" = x; then
24887         VERSION_MINOR=0
24888       fi
24889       if test "x$VERSION_SECURITY" = x; then
24890         VERSION_SECURITY=0
24891       fi
24892       if test "x$VERSION_PATCH" = x; then
24893         VERSION_PATCH=0
24894       fi
24895       if test "x$version_plus_separator" != x \
24896           && test "x$VERSION_BUILD$VERSION_OPT" = x; then
24897         as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
24898       fi
24899       # Stop the version part process from setting default values.
24900       # We still allow them to explicitly override though.
24901       NO_DEFAULT_VERSION_PARTS=true
24902     else
24903       as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
24904     fi
24905   fi
24906 
24907 
24908 # Check whether --with-version-pre was given.
24909 if test "${with_version_pre+set}" = set; then :
24910   withval=$with_version_pre; with_version_pre_present=true
24911 else
24912   with_version_pre_present=false
24913 fi
24914 
24915 
24916   if test "x$with_version_pre_present" = xtrue; then
24917     if test "x$with_version_pre" = xyes; then
24918       as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
24919     elif test "x$with_version_pre" = xno; then
24920       # Interpret --without-* as empty string instead of the literal "no"
24921       VERSION_PRE=
24922     else
24923       # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
24924        VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
24925       if test "x$VERSION_PRE" != "x$with_version_pre"; then
24926         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
24927 $as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
24928       fi
24929     fi
24930   else
24931     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24932       # Default is to use "internal" as pre
24933       VERSION_PRE="internal"
24934     fi
24935   fi
24936 
24937 
24938 # Check whether --with-version-opt was given.
24939 if test "${with_version_opt+set}" = set; then :
24940   withval=$with_version_opt; with_version_opt_present=true
24941 else
24942   with_version_opt_present=false
24943 fi
24944 
24945 
24946   if test "x$with_version_opt_present" = xtrue; then
24947     if test "x$with_version_opt" = xyes; then
24948       as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
24949     elif test "x$with_version_opt" = xno; then
24950       # Interpret --without-* as empty string instead of the literal "no"
24951       VERSION_OPT=
24952     else
24953       # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
24954        VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
24955       if test "x$VERSION_OPT" != "x$with_version_opt"; then
24956         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
24957 $as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
24958       fi
24959     fi
24960   else
24961     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24962       # Default is to calculate a string like this 'adhoc.<username>.<base dir name>'
24963       # Outer [ ] to quote m4.
24964        basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
24965       VERSION_OPT="adhoc.$USERNAME.$basedirname"
24966     fi
24967   fi
24968 
24969 
24970 # Check whether --with-version-build was given.
24971 if test "${with_version_build+set}" = set; then :
24972   withval=$with_version_build; with_version_build_present=true
24973 else
24974   with_version_build_present=false
24975 fi
24976 
24977 
24978   if test "x$with_version_build_present" = xtrue; then
24979     if test "x$with_version_build" = xyes; then
24980       as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
24981     elif test "x$with_version_build" = xno; then
24982       # Interpret --without-* as empty string instead of the literal "no"
24983       VERSION_BUILD=
24984     elif test "x$with_version_build" = x; then
24985       VERSION_BUILD=
24986     else
24987 
24988   # Additional [] needed to keep m4 from mangling shell constructs.
24989   if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24990     as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
24991   fi
24992   # Extract the version number without leading zeros.
24993   cleaned_value=${BASH_REMATCH[1]}
24994   if test "x$cleaned_value" = x; then
24995     # Special case for zero
24996     cleaned_value=${BASH_REMATCH[2]}
24997   fi
24998 
24999   if test $cleaned_value -gt 255; then
25000     as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
25001   fi
25002   if test "x$cleaned_value" != "x$with_version_build"; then
25003     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
25004 $as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
25005   fi
25006   VERSION_BUILD=$cleaned_value
25007 
25008     fi
25009   else
25010     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25011       # Default is to not have a build number.
25012       VERSION_BUILD=""
25013       # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
25014       VERSION_BUILD=0
25015     fi
25016   fi
25017 
25018 
25019 # Check whether --with-version-major was given.
25020 if test "${with_version_major+set}" = set; then :
25021   withval=$with_version_major; with_version_major_present=true
25022 else
25023   with_version_major_present=false
25024 fi
25025 
25026 
25027   if test "x$with_version_major_present" = xtrue; then
25028     if test "x$with_version_major" = xyes; then
25029       as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
25030     else
25031 
25032   # Additional [] needed to keep m4 from mangling shell constructs.
25033   if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25034     as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
25035   fi
25036   # Extract the version number without leading zeros.
25037   cleaned_value=${BASH_REMATCH[1]}
25038   if test "x$cleaned_value" = x; then
25039     # Special case for zero
25040     cleaned_value=${BASH_REMATCH[2]}
25041   fi
25042 
25043   if test $cleaned_value -gt 255; then
25044     as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
25045   fi
25046   if test "x$cleaned_value" != "x$with_version_major"; then
25047     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
25048 $as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
25049   fi
25050   VERSION_MAJOR=$cleaned_value
25051 
25052     fi
25053   else
25054     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25055       # Default is to get value from version-numbers
25056       VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
25057     fi
25058   fi
25059 
25060 
25061 # Check whether --with-version-minor was given.
25062 if test "${with_version_minor+set}" = set; then :
25063   withval=$with_version_minor; with_version_minor_present=true
25064 else
25065   with_version_minor_present=false
25066 fi
25067 
25068 
25069   if test "x$with_version_minor_present" = xtrue; then
25070     if test "x$with_version_minor" = xyes; then
25071       as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
25072     elif test "x$with_version_minor" = xno; then
25073       # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25074       VERSION_MINOR=0
25075     elif test "x$with_version_minor" = x; then
25076       VERSION_MINOR=0
25077     else
25078 
25079   # Additional [] needed to keep m4 from mangling shell constructs.
25080   if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25081     as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
25082   fi
25083   # Extract the version number without leading zeros.
25084   cleaned_value=${BASH_REMATCH[1]}
25085   if test "x$cleaned_value" = x; then
25086     # Special case for zero
25087     cleaned_value=${BASH_REMATCH[2]}
25088   fi
25089 
25090   if test $cleaned_value -gt 255; then
25091     as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
25092   fi
25093   if test "x$cleaned_value" != "x$with_version_minor"; then
25094     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
25095 $as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
25096   fi
25097   VERSION_MINOR=$cleaned_value
25098 
25099     fi
25100   else
25101     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25102       # Default is 0, if unspecified
25103       VERSION_MINOR=$DEFAULT_VERSION_MINOR
25104     fi
25105   fi
25106 
25107 
25108 # Check whether --with-version-security was given.
25109 if test "${with_version_security+set}" = set; then :
25110   withval=$with_version_security; with_version_security_present=true
25111 else
25112   with_version_security_present=false
25113 fi
25114 
25115 
25116   if test "x$with_version_security_present" = xtrue; then
25117     if test "x$with_version_security" = xyes; then
25118       as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
25119     elif test "x$with_version_security" = xno; then
25120       # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25121       VERSION_SECURITY=0
25122     elif test "x$with_version_security" = x; then
25123       VERSION_SECURITY=0
25124     else
25125 
25126   # Additional [] needed to keep m4 from mangling shell constructs.
25127   if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25128     as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
25129   fi
25130   # Extract the version number without leading zeros.
25131   cleaned_value=${BASH_REMATCH[1]}
25132   if test "x$cleaned_value" = x; then
25133     # Special case for zero
25134     cleaned_value=${BASH_REMATCH[2]}
25135   fi
25136 
25137   if test $cleaned_value -gt 255; then
25138     as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
25139   fi
25140   if test "x$cleaned_value" != "x$with_version_security"; then
25141     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
25142 $as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
25143   fi
25144   VERSION_SECURITY=$cleaned_value
25145 
25146     fi
25147   else
25148     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25149       # Default is 0, if unspecified
25150       VERSION_SECURITY=$DEFAULT_VERSION_SECURITY
25151     fi
25152   fi
25153 
25154 
25155 # Check whether --with-version-patch was given.
25156 if test "${with_version_patch+set}" = set; then :
25157   withval=$with_version_patch; with_version_patch_present=true
25158 else
25159   with_version_patch_present=false
25160 fi
25161 
25162 
25163   if test "x$with_version_patch_present" = xtrue; then
25164     if test "x$with_version_patch" = xyes; then
25165       as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
25166     elif test "x$with_version_patch" = xno; then
25167       # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25168       VERSION_PATCH=0
25169     elif test "x$with_version_patch" = x; then
25170       VERSION_PATCH=0
25171     else
25172 
25173   # Additional [] needed to keep m4 from mangling shell constructs.
25174   if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25175     as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
25176   fi
25177   # Extract the version number without leading zeros.
25178   cleaned_value=${BASH_REMATCH[1]}
25179   if test "x$cleaned_value" = x; then
25180     # Special case for zero
25181     cleaned_value=${BASH_REMATCH[2]}
25182   fi
25183 
25184   if test $cleaned_value -gt 255; then
25185     as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
25186   fi
25187   if test "x$cleaned_value" != "x$with_version_patch"; then
25188     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
25189 $as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
25190   fi
25191   VERSION_PATCH=$cleaned_value
25192 
25193     fi
25194   else
25195     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25196       # Default is 0, if unspecified
25197       VERSION_PATCH=$DEFAULT_VERSION_PATCH
25198     fi
25199   fi
25200 
25201   # Calculate derived version properties
25202 
25203   # Set VERSION_IS_GA based on if VERSION_PRE has a value
25204   if test "x$VERSION_PRE" = x; then
25205     VERSION_IS_GA=true
25206   else
25207     VERSION_IS_GA=false
25208   fi
25209 
25210   # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
25211   VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
25212 
25213   stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
25214   # Strip trailing zeroes from stripped_version_number
25215   for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
25216   VERSION_NUMBER=$stripped_version_number
25217 
25218   # The complete version string, with additional build information
25219   if test "x$VERSION_BUILD$VERSION_OPT" = x; then
25220     VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
25221   else
25222     # If either build or opt is set, we need a + separator
25223     VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
25224   fi
25225 
25226   # The short version string, just VERSION_NUMBER and PRE, if present.
25227   VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
25228 
25229   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
25230 $as_echo_n "checking for version string... " >&6; }
25231   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
25232 $as_echo "$VERSION_STRING" >&6; }
25233 
25234 
25235 
25236 
25237 
25238 
25239 
25240 
25241 
25242 
25243 
25244 
25245 
25246 
25247 
25248 ###############################################################################
25249 #
25250 # Setup BootJDK, used to bootstrap the build.
25251 #
25252 ###############################################################################
25253 
25254 
25255   BOOT_JDK_FOUND=no
25256 
25257 # Check whether --with-boot-jdk was given.
25258 if test "${with_boot_jdk+set}" = set; then :
25259   withval=$with_boot_jdk;
25260 fi
25261 
25262 
25263   # We look for the Boot JDK through various means, going from more certain to
25264   # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
25265   # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
25266   # must check if this is indeed valid; otherwise we'll continue looking.
25267 
25268   # Test: Is bootjdk explicitly set by command line arguments?
25269 
25270   if test "x$BOOT_JDK_FOUND" = xno; then
25271     # Now execute the test
25272 
25273   if test "x$with_boot_jdk" != x; then
25274     BOOT_JDK=$with_boot_jdk
25275     BOOT_JDK_FOUND=maybe
25276     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
25277 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
25278   fi
25279 
25280 
25281     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25282     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25283       # Do we have a bin/java?
25284       if test ! -x "$BOOT_JDK/bin/java"; then
25285         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25286 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25287         BOOT_JDK_FOUND=no
25288       else
25289         # Do we have a bin/javac?
25290         if test ! -x "$BOOT_JDK/bin/javac"; then
25291           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25292 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25293           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25294 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25295           BOOT_JDK_FOUND=no
25296         else
25297           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25298           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25299 
25300           # Extra M4 quote needed to protect [] in grep expression.
25301           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25302           if test "x$FOUND_CORRECT_VERSION" = x; then
25303             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25304 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25305             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25306 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25307             BOOT_JDK_FOUND=no
25308           else
25309             # We're done! :-)
25310             BOOT_JDK_FOUND=yes
25311 
25312   # Only process if variable expands to non-empty
25313 
25314   if test "x$BOOT_JDK" != x; then
25315     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25316 
25317   # Input might be given as Windows format, start by converting to
25318   # unix format.
25319   path="$BOOT_JDK"
25320   new_path=`$CYGPATH -u "$path"`
25321 
25322   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25323   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25324   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25325   # "foo.exe" is OK but "foo" is an error.
25326   #
25327   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25328   # It is also a way to make sure we got the proper file name for the real test later on.
25329   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25330   if test "x$test_shortpath" = x; then
25331     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25332 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25333     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25334   fi
25335 
25336   # Call helper function which possibly converts this using DOS-style short mode.
25337   # If so, the updated path is stored in $new_path.
25338 
25339   input_path="$new_path"
25340   # Check if we need to convert this using DOS-style short mode. If the path
25341   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25342   # take no chances and rewrite it.
25343   # Note: m4 eats our [], so we need to use [ and ] instead.
25344   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25345   if test "x$has_forbidden_chars" != x; then
25346     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25347     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25348     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25349     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25350       # Going to short mode and back again did indeed matter. Since short mode is
25351       # case insensitive, let's make it lowercase to improve readability.
25352       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25353       # Now convert it back to Unix-style (cygpath)
25354       input_path=`$CYGPATH -u "$shortmode_path"`
25355       new_path="$input_path"
25356     fi
25357   fi
25358 
25359   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25360   if test "x$test_cygdrive_prefix" = x; then
25361     # As a simple fix, exclude /usr/bin since it's not a real path.
25362     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25363       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25364       # a path prefixed by /cygdrive for fixpath to work.
25365       new_path="$CYGWIN_ROOT_PATH$input_path"
25366     fi
25367   fi
25368 
25369 
25370   if test "x$path" != "x$new_path"; then
25371     BOOT_JDK="$new_path"
25372     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25373 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25374   fi
25375 
25376     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25377 
25378   path="$BOOT_JDK"
25379   has_colon=`$ECHO $path | $GREP ^.:`
25380   new_path="$path"
25381   if test "x$has_colon" = x; then
25382     # Not in mixed or Windows style, start by that.
25383     new_path=`cmd //c echo $path`
25384   fi
25385 
25386 
25387   input_path="$new_path"
25388   # Check if we need to convert this using DOS-style short mode. If the path
25389   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25390   # take no chances and rewrite it.
25391   # Note: m4 eats our [], so we need to use [ and ] instead.
25392   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25393   if test "x$has_forbidden_chars" != x; then
25394     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25395     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25396   fi
25397 
25398 
25399   windows_path="$new_path"
25400   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25401     unix_path=`$CYGPATH -u "$windows_path"`
25402     new_path="$unix_path"
25403   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25404     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25405     new_path="$unix_path"
25406   fi
25407 
25408   if test "x$path" != "x$new_path"; then
25409     BOOT_JDK="$new_path"
25410     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25411 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25412   fi
25413 
25414   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25415   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25416 
25417     else
25418       # We're on a unix platform. Hooray! :)
25419       path="$BOOT_JDK"
25420       has_space=`$ECHO "$path" | $GREP " "`
25421       if test "x$has_space" != x; then
25422         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25423 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25424         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25425       fi
25426 
25427       # Use eval to expand a potential ~
25428       eval path="$path"
25429       if test ! -f "$path" && test ! -d "$path"; then
25430         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25431       fi
25432 
25433       if test -d "$path"; then
25434         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25435       else
25436         dir="`$DIRNAME "$path"`"
25437         base="`$BASENAME "$path"`"
25438         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25439       fi
25440     fi
25441   fi
25442 
25443             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25444 $as_echo_n "checking for Boot JDK... " >&6; }
25445             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25446 $as_echo "$BOOT_JDK" >&6; }
25447             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25448 $as_echo_n "checking Boot JDK version... " >&6; }
25449             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25450             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25451 $as_echo "$BOOT_JDK_VERSION" >&6; }
25452           fi # end check jdk version
25453         fi # end check javac
25454       fi # end check java
25455     fi # end check boot jdk found
25456   fi
25457 
25458   if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
25459     # Having specified an argument which is incorrect will produce an instant failure;
25460     # we should not go on looking
25461     as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
25462   fi
25463 
25464   # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
25465 
25466   if test "x$BOOT_JDK_FOUND" = xno; then
25467     # Now execute the test
25468 
25469   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
25470     # First check at user selected default
25471 
25472   if test "x$BOOT_JDK_FOUND" = xno; then
25473     # Now execute the test
25474 
25475   if test -x /usr/libexec/java_home; then
25476     BOOT_JDK=`/usr/libexec/java_home `
25477     BOOT_JDK_FOUND=maybe
25478     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
25479 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
25480   fi
25481 
25482 
25483     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25484     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25485       # Do we have a bin/java?
25486       if test ! -x "$BOOT_JDK/bin/java"; then
25487         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25488 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25489         BOOT_JDK_FOUND=no
25490       else
25491         # Do we have a bin/javac?
25492         if test ! -x "$BOOT_JDK/bin/javac"; then
25493           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25494 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25495           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25496 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25497           BOOT_JDK_FOUND=no
25498         else
25499           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25500           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25501 
25502           # Extra M4 quote needed to protect [] in grep expression.
25503           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25504           if test "x$FOUND_CORRECT_VERSION" = x; then
25505             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25506 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25507             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25508 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25509             BOOT_JDK_FOUND=no
25510           else
25511             # We're done! :-)
25512             BOOT_JDK_FOUND=yes
25513 
25514   # Only process if variable expands to non-empty
25515 
25516   if test "x$BOOT_JDK" != x; then
25517     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25518 
25519   # Input might be given as Windows format, start by converting to
25520   # unix format.
25521   path="$BOOT_JDK"
25522   new_path=`$CYGPATH -u "$path"`
25523 
25524   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25525   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25526   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25527   # "foo.exe" is OK but "foo" is an error.
25528   #
25529   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25530   # It is also a way to make sure we got the proper file name for the real test later on.
25531   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25532   if test "x$test_shortpath" = x; then
25533     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25534 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25535     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25536   fi
25537 
25538   # Call helper function which possibly converts this using DOS-style short mode.
25539   # If so, the updated path is stored in $new_path.
25540 
25541   input_path="$new_path"
25542   # Check if we need to convert this using DOS-style short mode. If the path
25543   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25544   # take no chances and rewrite it.
25545   # Note: m4 eats our [], so we need to use [ and ] instead.
25546   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25547   if test "x$has_forbidden_chars" != x; then
25548     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25549     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25550     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25551     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25552       # Going to short mode and back again did indeed matter. Since short mode is
25553       # case insensitive, let's make it lowercase to improve readability.
25554       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25555       # Now convert it back to Unix-style (cygpath)
25556       input_path=`$CYGPATH -u "$shortmode_path"`
25557       new_path="$input_path"
25558     fi
25559   fi
25560 
25561   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25562   if test "x$test_cygdrive_prefix" = x; then
25563     # As a simple fix, exclude /usr/bin since it's not a real path.
25564     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25565       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25566       # a path prefixed by /cygdrive for fixpath to work.
25567       new_path="$CYGWIN_ROOT_PATH$input_path"
25568     fi
25569   fi
25570 
25571 
25572   if test "x$path" != "x$new_path"; then
25573     BOOT_JDK="$new_path"
25574     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25575 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25576   fi
25577 
25578     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25579 
25580   path="$BOOT_JDK"
25581   has_colon=`$ECHO $path | $GREP ^.:`
25582   new_path="$path"
25583   if test "x$has_colon" = x; then
25584     # Not in mixed or Windows style, start by that.
25585     new_path=`cmd //c echo $path`
25586   fi
25587 
25588 
25589   input_path="$new_path"
25590   # Check if we need to convert this using DOS-style short mode. If the path
25591   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25592   # take no chances and rewrite it.
25593   # Note: m4 eats our [], so we need to use [ and ] instead.
25594   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25595   if test "x$has_forbidden_chars" != x; then
25596     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25597     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25598   fi
25599 
25600 
25601   windows_path="$new_path"
25602   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25603     unix_path=`$CYGPATH -u "$windows_path"`
25604     new_path="$unix_path"
25605   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25606     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25607     new_path="$unix_path"
25608   fi
25609 
25610   if test "x$path" != "x$new_path"; then
25611     BOOT_JDK="$new_path"
25612     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25613 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25614   fi
25615 
25616   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25617   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25618 
25619     else
25620       # We're on a unix platform. Hooray! :)
25621       path="$BOOT_JDK"
25622       has_space=`$ECHO "$path" | $GREP " "`
25623       if test "x$has_space" != x; then
25624         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25625 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25626         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25627       fi
25628 
25629       # Use eval to expand a potential ~
25630       eval path="$path"
25631       if test ! -f "$path" && test ! -d "$path"; then
25632         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25633       fi
25634 
25635       if test -d "$path"; then
25636         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25637       else
25638         dir="`$DIRNAME "$path"`"
25639         base="`$BASENAME "$path"`"
25640         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25641       fi
25642     fi
25643   fi
25644 
25645             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25646 $as_echo_n "checking for Boot JDK... " >&6; }
25647             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25648 $as_echo "$BOOT_JDK" >&6; }
25649             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25650 $as_echo_n "checking Boot JDK version... " >&6; }
25651             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25652             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25653 $as_echo "$BOOT_JDK_VERSION" >&6; }
25654           fi # end check jdk version
25655         fi # end check javac
25656       fi # end check java
25657     fi # end check boot jdk found
25658   fi
25659 
25660     # If that did not work out (e.g. too old), try explicit versions instead
25661 
25662   if test "x$BOOT_JDK_FOUND" = xno; then
25663     # Now execute the test
25664 
25665   if test -x /usr/libexec/java_home; then
25666     BOOT_JDK=`/usr/libexec/java_home -v 1.9`
25667     BOOT_JDK_FOUND=maybe
25668     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
25669 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
25670   fi
25671 
25672 
25673     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25674     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25675       # Do we have a bin/java?
25676       if test ! -x "$BOOT_JDK/bin/java"; then
25677         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25678 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25679         BOOT_JDK_FOUND=no
25680       else
25681         # Do we have a bin/javac?
25682         if test ! -x "$BOOT_JDK/bin/javac"; then
25683           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25684 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25685           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25686 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25687           BOOT_JDK_FOUND=no
25688         else
25689           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25690           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25691 
25692           # Extra M4 quote needed to protect [] in grep expression.
25693           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25694           if test "x$FOUND_CORRECT_VERSION" = x; then
25695             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25696 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25697             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25698 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25699             BOOT_JDK_FOUND=no
25700           else
25701             # We're done! :-)
25702             BOOT_JDK_FOUND=yes
25703 
25704   # Only process if variable expands to non-empty
25705 
25706   if test "x$BOOT_JDK" != x; then
25707     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25708 
25709   # Input might be given as Windows format, start by converting to
25710   # unix format.
25711   path="$BOOT_JDK"
25712   new_path=`$CYGPATH -u "$path"`
25713 
25714   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25715   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25716   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25717   # "foo.exe" is OK but "foo" is an error.
25718   #
25719   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25720   # It is also a way to make sure we got the proper file name for the real test later on.
25721   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25722   if test "x$test_shortpath" = x; then
25723     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25724 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25725     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25726   fi
25727 
25728   # Call helper function which possibly converts this using DOS-style short mode.
25729   # If so, the updated path is stored in $new_path.
25730 
25731   input_path="$new_path"
25732   # Check if we need to convert this using DOS-style short mode. If the path
25733   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25734   # take no chances and rewrite it.
25735   # Note: m4 eats our [], so we need to use [ and ] instead.
25736   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25737   if test "x$has_forbidden_chars" != x; then
25738     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25739     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25740     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25741     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25742       # Going to short mode and back again did indeed matter. Since short mode is
25743       # case insensitive, let's make it lowercase to improve readability.
25744       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25745       # Now convert it back to Unix-style (cygpath)
25746       input_path=`$CYGPATH -u "$shortmode_path"`
25747       new_path="$input_path"
25748     fi
25749   fi
25750 
25751   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25752   if test "x$test_cygdrive_prefix" = x; then
25753     # As a simple fix, exclude /usr/bin since it's not a real path.
25754     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25755       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25756       # a path prefixed by /cygdrive for fixpath to work.
25757       new_path="$CYGWIN_ROOT_PATH$input_path"
25758     fi
25759   fi
25760 
25761 
25762   if test "x$path" != "x$new_path"; then
25763     BOOT_JDK="$new_path"
25764     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25765 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25766   fi
25767 
25768     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25769 
25770   path="$BOOT_JDK"
25771   has_colon=`$ECHO $path | $GREP ^.:`
25772   new_path="$path"
25773   if test "x$has_colon" = x; then
25774     # Not in mixed or Windows style, start by that.
25775     new_path=`cmd //c echo $path`
25776   fi
25777 
25778 
25779   input_path="$new_path"
25780   # Check if we need to convert this using DOS-style short mode. If the path
25781   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25782   # take no chances and rewrite it.
25783   # Note: m4 eats our [], so we need to use [ and ] instead.
25784   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25785   if test "x$has_forbidden_chars" != x; then
25786     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25787     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25788   fi
25789 
25790 
25791   windows_path="$new_path"
25792   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25793     unix_path=`$CYGPATH -u "$windows_path"`
25794     new_path="$unix_path"
25795   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25796     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25797     new_path="$unix_path"
25798   fi
25799 
25800   if test "x$path" != "x$new_path"; then
25801     BOOT_JDK="$new_path"
25802     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25803 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25804   fi
25805 
25806   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25807   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25808 
25809     else
25810       # We're on a unix platform. Hooray! :)
25811       path="$BOOT_JDK"
25812       has_space=`$ECHO "$path" | $GREP " "`
25813       if test "x$has_space" != x; then
25814         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25815 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25816         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25817       fi
25818 
25819       # Use eval to expand a potential ~
25820       eval path="$path"
25821       if test ! -f "$path" && test ! -d "$path"; then
25822         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25823       fi
25824 
25825       if test -d "$path"; then
25826         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25827       else
25828         dir="`$DIRNAME "$path"`"
25829         base="`$BASENAME "$path"`"
25830         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25831       fi
25832     fi
25833   fi
25834 
25835             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25836 $as_echo_n "checking for Boot JDK... " >&6; }
25837             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25838 $as_echo "$BOOT_JDK" >&6; }
25839             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25840 $as_echo_n "checking Boot JDK version... " >&6; }
25841             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25842             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25843 $as_echo "$BOOT_JDK_VERSION" >&6; }
25844           fi # end check jdk version
25845         fi # end check javac
25846       fi # end check java
25847     fi # end check boot jdk found
25848   fi
25849 
25850 
25851   if test "x$BOOT_JDK_FOUND" = xno; then
25852     # Now execute the test
25853 
25854   if test -x /usr/libexec/java_home; then
25855     BOOT_JDK=`/usr/libexec/java_home -v 1.8`
25856     BOOT_JDK_FOUND=maybe
25857     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
25858 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
25859   fi
25860 
25861 
25862     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25863     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25864       # Do we have a bin/java?
25865       if test ! -x "$BOOT_JDK/bin/java"; then
25866         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25867 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25868         BOOT_JDK_FOUND=no
25869       else
25870         # Do we have a bin/javac?
25871         if test ! -x "$BOOT_JDK/bin/javac"; then
25872           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25873 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25874           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25875 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25876           BOOT_JDK_FOUND=no
25877         else
25878           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25879           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25880 
25881           # Extra M4 quote needed to protect [] in grep expression.
25882           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25883           if test "x$FOUND_CORRECT_VERSION" = x; then
25884             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25885 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25886             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25887 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25888             BOOT_JDK_FOUND=no
25889           else
25890             # We're done! :-)
25891             BOOT_JDK_FOUND=yes
25892 
25893   # Only process if variable expands to non-empty
25894 
25895   if test "x$BOOT_JDK" != x; then
25896     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25897 
25898   # Input might be given as Windows format, start by converting to
25899   # unix format.
25900   path="$BOOT_JDK"
25901   new_path=`$CYGPATH -u "$path"`
25902 
25903   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25904   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25905   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25906   # "foo.exe" is OK but "foo" is an error.
25907   #
25908   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25909   # It is also a way to make sure we got the proper file name for the real test later on.
25910   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25911   if test "x$test_shortpath" = x; then
25912     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25913 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25914     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25915   fi
25916 
25917   # Call helper function which possibly converts this using DOS-style short mode.
25918   # If so, the updated path is stored in $new_path.
25919 
25920   input_path="$new_path"
25921   # Check if we need to convert this using DOS-style short mode. If the path
25922   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25923   # take no chances and rewrite it.
25924   # Note: m4 eats our [], so we need to use [ and ] instead.
25925   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25926   if test "x$has_forbidden_chars" != x; then
25927     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25928     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25929     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25930     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25931       # Going to short mode and back again did indeed matter. Since short mode is
25932       # case insensitive, let's make it lowercase to improve readability.
25933       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25934       # Now convert it back to Unix-style (cygpath)
25935       input_path=`$CYGPATH -u "$shortmode_path"`
25936       new_path="$input_path"
25937     fi
25938   fi
25939 
25940   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25941   if test "x$test_cygdrive_prefix" = x; then
25942     # As a simple fix, exclude /usr/bin since it's not a real path.
25943     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25944       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25945       # a path prefixed by /cygdrive for fixpath to work.
25946       new_path="$CYGWIN_ROOT_PATH$input_path"
25947     fi
25948   fi
25949 
25950 
25951   if test "x$path" != "x$new_path"; then
25952     BOOT_JDK="$new_path"
25953     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25954 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25955   fi
25956 
25957     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25958 
25959   path="$BOOT_JDK"
25960   has_colon=`$ECHO $path | $GREP ^.:`
25961   new_path="$path"
25962   if test "x$has_colon" = x; then
25963     # Not in mixed or Windows style, start by that.
25964     new_path=`cmd //c echo $path`
25965   fi
25966 
25967 
25968   input_path="$new_path"
25969   # Check if we need to convert this using DOS-style short mode. If the path
25970   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25971   # take no chances and rewrite it.
25972   # Note: m4 eats our [], so we need to use [ and ] instead.
25973   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25974   if test "x$has_forbidden_chars" != x; then
25975     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25976     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25977   fi
25978 
25979 
25980   windows_path="$new_path"
25981   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25982     unix_path=`$CYGPATH -u "$windows_path"`
25983     new_path="$unix_path"
25984   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25985     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25986     new_path="$unix_path"
25987   fi
25988 
25989   if test "x$path" != "x$new_path"; then
25990     BOOT_JDK="$new_path"
25991     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25992 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25993   fi
25994 
25995   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25996   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25997 
25998     else
25999       # We're on a unix platform. Hooray! :)
26000       path="$BOOT_JDK"
26001       has_space=`$ECHO "$path" | $GREP " "`
26002       if test "x$has_space" != x; then
26003         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26004 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26005         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26006       fi
26007 
26008       # Use eval to expand a potential ~
26009       eval path="$path"
26010       if test ! -f "$path" && test ! -d "$path"; then
26011         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26012       fi
26013 
26014       if test -d "$path"; then
26015         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26016       else
26017         dir="`$DIRNAME "$path"`"
26018         base="`$BASENAME "$path"`"
26019         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26020       fi
26021     fi
26022   fi
26023 
26024             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26025 $as_echo_n "checking for Boot JDK... " >&6; }
26026             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26027 $as_echo "$BOOT_JDK" >&6; }
26028             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26029 $as_echo_n "checking Boot JDK version... " >&6; }
26030             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26031             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26032 $as_echo "$BOOT_JDK_VERSION" >&6; }
26033           fi # end check jdk version
26034         fi # end check javac
26035       fi # end check java
26036     fi # end check boot jdk found
26037   fi
26038 
26039 
26040   if test "x$BOOT_JDK_FOUND" = xno; then
26041     # Now execute the test
26042 
26043   if test -x /usr/libexec/java_home; then
26044     BOOT_JDK=`/usr/libexec/java_home -v 1.7`
26045     BOOT_JDK_FOUND=maybe
26046     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
26047 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
26048   fi
26049 
26050 
26051     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26052     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26053       # Do we have a bin/java?
26054       if test ! -x "$BOOT_JDK/bin/java"; then
26055         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26056 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26057         BOOT_JDK_FOUND=no
26058       else
26059         # Do we have a bin/javac?
26060         if test ! -x "$BOOT_JDK/bin/javac"; then
26061           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26062 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26063           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26064 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26065           BOOT_JDK_FOUND=no
26066         else
26067           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26068           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26069 
26070           # Extra M4 quote needed to protect [] in grep expression.
26071           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26072           if test "x$FOUND_CORRECT_VERSION" = x; then
26073             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26074 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26075             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26076 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26077             BOOT_JDK_FOUND=no
26078           else
26079             # We're done! :-)
26080             BOOT_JDK_FOUND=yes
26081 
26082   # Only process if variable expands to non-empty
26083 
26084   if test "x$BOOT_JDK" != x; then
26085     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26086 
26087   # Input might be given as Windows format, start by converting to
26088   # unix format.
26089   path="$BOOT_JDK"
26090   new_path=`$CYGPATH -u "$path"`
26091 
26092   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26093   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26094   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26095   # "foo.exe" is OK but "foo" is an error.
26096   #
26097   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26098   # It is also a way to make sure we got the proper file name for the real test later on.
26099   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26100   if test "x$test_shortpath" = x; then
26101     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26102 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26103     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26104   fi
26105 
26106   # Call helper function which possibly converts this using DOS-style short mode.
26107   # If so, the updated path is stored in $new_path.
26108 
26109   input_path="$new_path"
26110   # Check if we need to convert this using DOS-style short mode. If the path
26111   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26112   # take no chances and rewrite it.
26113   # Note: m4 eats our [], so we need to use [ and ] instead.
26114   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26115   if test "x$has_forbidden_chars" != x; then
26116     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26117     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26118     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26119     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26120       # Going to short mode and back again did indeed matter. Since short mode is
26121       # case insensitive, let's make it lowercase to improve readability.
26122       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26123       # Now convert it back to Unix-style (cygpath)
26124       input_path=`$CYGPATH -u "$shortmode_path"`
26125       new_path="$input_path"
26126     fi
26127   fi
26128 
26129   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26130   if test "x$test_cygdrive_prefix" = x; then
26131     # As a simple fix, exclude /usr/bin since it's not a real path.
26132     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26133       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26134       # a path prefixed by /cygdrive for fixpath to work.
26135       new_path="$CYGWIN_ROOT_PATH$input_path"
26136     fi
26137   fi
26138 
26139 
26140   if test "x$path" != "x$new_path"; then
26141     BOOT_JDK="$new_path"
26142     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26143 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26144   fi
26145 
26146     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26147 
26148   path="$BOOT_JDK"
26149   has_colon=`$ECHO $path | $GREP ^.:`
26150   new_path="$path"
26151   if test "x$has_colon" = x; then
26152     # Not in mixed or Windows style, start by that.
26153     new_path=`cmd //c echo $path`
26154   fi
26155 
26156 
26157   input_path="$new_path"
26158   # Check if we need to convert this using DOS-style short mode. If the path
26159   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26160   # take no chances and rewrite it.
26161   # Note: m4 eats our [], so we need to use [ and ] instead.
26162   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26163   if test "x$has_forbidden_chars" != x; then
26164     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26165     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26166   fi
26167 
26168 
26169   windows_path="$new_path"
26170   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26171     unix_path=`$CYGPATH -u "$windows_path"`
26172     new_path="$unix_path"
26173   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26174     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26175     new_path="$unix_path"
26176   fi
26177 
26178   if test "x$path" != "x$new_path"; then
26179     BOOT_JDK="$new_path"
26180     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26181 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26182   fi
26183 
26184   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26185   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26186 
26187     else
26188       # We're on a unix platform. Hooray! :)
26189       path="$BOOT_JDK"
26190       has_space=`$ECHO "$path" | $GREP " "`
26191       if test "x$has_space" != x; then
26192         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26193 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26194         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26195       fi
26196 
26197       # Use eval to expand a potential ~
26198       eval path="$path"
26199       if test ! -f "$path" && test ! -d "$path"; then
26200         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26201       fi
26202 
26203       if test -d "$path"; then
26204         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26205       else
26206         dir="`$DIRNAME "$path"`"
26207         base="`$BASENAME "$path"`"
26208         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26209       fi
26210     fi
26211   fi
26212 
26213             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26214 $as_echo_n "checking for Boot JDK... " >&6; }
26215             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26216 $as_echo "$BOOT_JDK" >&6; }
26217             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26218 $as_echo_n "checking Boot JDK version... " >&6; }
26219             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26220             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26221 $as_echo "$BOOT_JDK_VERSION" >&6; }
26222           fi # end check jdk version
26223         fi # end check javac
26224       fi # end check java
26225     fi # end check boot jdk found
26226   fi
26227 
26228   fi
26229 
26230 
26231     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26232     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26233       # Do we have a bin/java?
26234       if test ! -x "$BOOT_JDK/bin/java"; then
26235         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26236 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26237         BOOT_JDK_FOUND=no
26238       else
26239         # Do we have a bin/javac?
26240         if test ! -x "$BOOT_JDK/bin/javac"; then
26241           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26242 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26243           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26244 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26245           BOOT_JDK_FOUND=no
26246         else
26247           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26248           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26249 
26250           # Extra M4 quote needed to protect [] in grep expression.
26251           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26252           if test "x$FOUND_CORRECT_VERSION" = x; then
26253             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26254 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26255             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26256 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26257             BOOT_JDK_FOUND=no
26258           else
26259             # We're done! :-)
26260             BOOT_JDK_FOUND=yes
26261 
26262   # Only process if variable expands to non-empty
26263 
26264   if test "x$BOOT_JDK" != x; then
26265     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26266 
26267   # Input might be given as Windows format, start by converting to
26268   # unix format.
26269   path="$BOOT_JDK"
26270   new_path=`$CYGPATH -u "$path"`
26271 
26272   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26273   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26274   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26275   # "foo.exe" is OK but "foo" is an error.
26276   #
26277   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26278   # It is also a way to make sure we got the proper file name for the real test later on.
26279   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26280   if test "x$test_shortpath" = x; then
26281     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26282 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26283     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26284   fi
26285 
26286   # Call helper function which possibly converts this using DOS-style short mode.
26287   # If so, the updated path is stored in $new_path.
26288 
26289   input_path="$new_path"
26290   # Check if we need to convert this using DOS-style short mode. If the path
26291   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26292   # take no chances and rewrite it.
26293   # Note: m4 eats our [], so we need to use [ and ] instead.
26294   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26295   if test "x$has_forbidden_chars" != x; then
26296     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26297     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26298     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26299     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26300       # Going to short mode and back again did indeed matter. Since short mode is
26301       # case insensitive, let's make it lowercase to improve readability.
26302       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26303       # Now convert it back to Unix-style (cygpath)
26304       input_path=`$CYGPATH -u "$shortmode_path"`
26305       new_path="$input_path"
26306     fi
26307   fi
26308 
26309   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26310   if test "x$test_cygdrive_prefix" = x; then
26311     # As a simple fix, exclude /usr/bin since it's not a real path.
26312     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26313       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26314       # a path prefixed by /cygdrive for fixpath to work.
26315       new_path="$CYGWIN_ROOT_PATH$input_path"
26316     fi
26317   fi
26318 
26319 
26320   if test "x$path" != "x$new_path"; then
26321     BOOT_JDK="$new_path"
26322     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26323 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26324   fi
26325 
26326     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26327 
26328   path="$BOOT_JDK"
26329   has_colon=`$ECHO $path | $GREP ^.:`
26330   new_path="$path"
26331   if test "x$has_colon" = x; then
26332     # Not in mixed or Windows style, start by that.
26333     new_path=`cmd //c echo $path`
26334   fi
26335 
26336 
26337   input_path="$new_path"
26338   # Check if we need to convert this using DOS-style short mode. If the path
26339   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26340   # take no chances and rewrite it.
26341   # Note: m4 eats our [], so we need to use [ and ] instead.
26342   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26343   if test "x$has_forbidden_chars" != x; then
26344     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26345     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26346   fi
26347 
26348 
26349   windows_path="$new_path"
26350   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26351     unix_path=`$CYGPATH -u "$windows_path"`
26352     new_path="$unix_path"
26353   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26354     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26355     new_path="$unix_path"
26356   fi
26357 
26358   if test "x$path" != "x$new_path"; then
26359     BOOT_JDK="$new_path"
26360     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26361 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26362   fi
26363 
26364   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26365   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26366 
26367     else
26368       # We're on a unix platform. Hooray! :)
26369       path="$BOOT_JDK"
26370       has_space=`$ECHO "$path" | $GREP " "`
26371       if test "x$has_space" != x; then
26372         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26373 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26374         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26375       fi
26376 
26377       # Use eval to expand a potential ~
26378       eval path="$path"
26379       if test ! -f "$path" && test ! -d "$path"; then
26380         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26381       fi
26382 
26383       if test -d "$path"; then
26384         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26385       else
26386         dir="`$DIRNAME "$path"`"
26387         base="`$BASENAME "$path"`"
26388         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26389       fi
26390     fi
26391   fi
26392 
26393             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26394 $as_echo_n "checking for Boot JDK... " >&6; }
26395             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26396 $as_echo "$BOOT_JDK" >&6; }
26397             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26398 $as_echo_n "checking Boot JDK version... " >&6; }
26399             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26400             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26401 $as_echo "$BOOT_JDK_VERSION" >&6; }
26402           fi # end check jdk version
26403         fi # end check javac
26404       fi # end check java
26405     fi # end check boot jdk found
26406   fi
26407 
26408 
26409   # Test: Is $JAVA_HOME set?
26410 
26411   if test "x$BOOT_JDK_FOUND" = xno; then
26412     # Now execute the test
26413 
26414   if test "x$JAVA_HOME" != x; then
26415     JAVA_HOME_PROCESSED="$JAVA_HOME"
26416 
26417   # Only process if variable expands to non-empty
26418 
26419   if test "x$JAVA_HOME_PROCESSED" != x; then
26420     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26421 
26422   # Input might be given as Windows format, start by converting to
26423   # unix format.
26424   path="$JAVA_HOME_PROCESSED"
26425   new_path=`$CYGPATH -u "$path"`
26426 
26427   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26428   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26429   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26430   # "foo.exe" is OK but "foo" is an error.
26431   #
26432   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26433   # It is also a way to make sure we got the proper file name for the real test later on.
26434   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26435   if test "x$test_shortpath" = x; then
26436     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26437 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26438     as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
26439   fi
26440 
26441   # Call helper function which possibly converts this using DOS-style short mode.
26442   # If so, the updated path is stored in $new_path.
26443 
26444   input_path="$new_path"
26445   # Check if we need to convert this using DOS-style short mode. If the path
26446   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26447   # take no chances and rewrite it.
26448   # Note: m4 eats our [], so we need to use [ and ] instead.
26449   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26450   if test "x$has_forbidden_chars" != x; then
26451     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26452     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26453     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26454     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26455       # Going to short mode and back again did indeed matter. Since short mode is
26456       # case insensitive, let's make it lowercase to improve readability.
26457       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26458       # Now convert it back to Unix-style (cygpath)
26459       input_path=`$CYGPATH -u "$shortmode_path"`
26460       new_path="$input_path"
26461     fi
26462   fi
26463 
26464   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26465   if test "x$test_cygdrive_prefix" = x; then
26466     # As a simple fix, exclude /usr/bin since it's not a real path.
26467     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26468       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26469       # a path prefixed by /cygdrive for fixpath to work.
26470       new_path="$CYGWIN_ROOT_PATH$input_path"
26471     fi
26472   fi
26473 
26474 
26475   if test "x$path" != "x$new_path"; then
26476     JAVA_HOME_PROCESSED="$new_path"
26477     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26478 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26479   fi
26480 
26481     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26482 
26483   path="$JAVA_HOME_PROCESSED"
26484   has_colon=`$ECHO $path | $GREP ^.:`
26485   new_path="$path"
26486   if test "x$has_colon" = x; then
26487     # Not in mixed or Windows style, start by that.
26488     new_path=`cmd //c echo $path`
26489   fi
26490 
26491 
26492   input_path="$new_path"
26493   # Check if we need to convert this using DOS-style short mode. If the path
26494   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26495   # take no chances and rewrite it.
26496   # Note: m4 eats our [], so we need to use [ and ] instead.
26497   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26498   if test "x$has_forbidden_chars" != x; then
26499     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26500     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26501   fi
26502 
26503 
26504   windows_path="$new_path"
26505   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26506     unix_path=`$CYGPATH -u "$windows_path"`
26507     new_path="$unix_path"
26508   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26509     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26510     new_path="$unix_path"
26511   fi
26512 
26513   if test "x$path" != "x$new_path"; then
26514     JAVA_HOME_PROCESSED="$new_path"
26515     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26516 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26517   fi
26518 
26519   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26520   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26521 
26522     else
26523       # We're on a unix platform. Hooray! :)
26524       path="$JAVA_HOME_PROCESSED"
26525       has_space=`$ECHO "$path" | $GREP " "`
26526       if test "x$has_space" != x; then
26527         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26528 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26529         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26530       fi
26531 
26532       # Use eval to expand a potential ~
26533       eval path="$path"
26534       if test ! -f "$path" && test ! -d "$path"; then
26535         as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26536       fi
26537 
26538       if test -d "$path"; then
26539         JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26540       else
26541         dir="`$DIRNAME "$path"`"
26542         base="`$BASENAME "$path"`"
26543         JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26544       fi
26545     fi
26546   fi
26547 
26548     if test ! -d "$JAVA_HOME_PROCESSED"; then
26549       { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26550 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26551     else
26552       # Aha, the user has set a JAVA_HOME
26553       # let us use that as the Boot JDK.
26554       BOOT_JDK="$JAVA_HOME_PROCESSED"
26555       BOOT_JDK_FOUND=maybe
26556       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26557 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26558     fi
26559   fi
26560 
26561 
26562     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26563     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26564       # Do we have a bin/java?
26565       if test ! -x "$BOOT_JDK/bin/java"; then
26566         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26567 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26568         BOOT_JDK_FOUND=no
26569       else
26570         # Do we have a bin/javac?
26571         if test ! -x "$BOOT_JDK/bin/javac"; then
26572           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26573 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26574           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26575 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26576           BOOT_JDK_FOUND=no
26577         else
26578           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26579           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26580 
26581           # Extra M4 quote needed to protect [] in grep expression.
26582           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26583           if test "x$FOUND_CORRECT_VERSION" = x; then
26584             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26585 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26586             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26587 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26588             BOOT_JDK_FOUND=no
26589           else
26590             # We're done! :-)
26591             BOOT_JDK_FOUND=yes
26592 
26593   # Only process if variable expands to non-empty
26594 
26595   if test "x$BOOT_JDK" != x; then
26596     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26597 
26598   # Input might be given as Windows format, start by converting to
26599   # unix format.
26600   path="$BOOT_JDK"
26601   new_path=`$CYGPATH -u "$path"`
26602 
26603   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26604   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26605   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26606   # "foo.exe" is OK but "foo" is an error.
26607   #
26608   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26609   # It is also a way to make sure we got the proper file name for the real test later on.
26610   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26611   if test "x$test_shortpath" = x; then
26612     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26613 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26614     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26615   fi
26616 
26617   # Call helper function which possibly converts this using DOS-style short mode.
26618   # If so, the updated path is stored in $new_path.
26619 
26620   input_path="$new_path"
26621   # Check if we need to convert this using DOS-style short mode. If the path
26622   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26623   # take no chances and rewrite it.
26624   # Note: m4 eats our [], so we need to use [ and ] instead.
26625   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26626   if test "x$has_forbidden_chars" != x; then
26627     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26628     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26629     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26630     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26631       # Going to short mode and back again did indeed matter. Since short mode is
26632       # case insensitive, let's make it lowercase to improve readability.
26633       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26634       # Now convert it back to Unix-style (cygpath)
26635       input_path=`$CYGPATH -u "$shortmode_path"`
26636       new_path="$input_path"
26637     fi
26638   fi
26639 
26640   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26641   if test "x$test_cygdrive_prefix" = x; then
26642     # As a simple fix, exclude /usr/bin since it's not a real path.
26643     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26644       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26645       # a path prefixed by /cygdrive for fixpath to work.
26646       new_path="$CYGWIN_ROOT_PATH$input_path"
26647     fi
26648   fi
26649 
26650 
26651   if test "x$path" != "x$new_path"; then
26652     BOOT_JDK="$new_path"
26653     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26654 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26655   fi
26656 
26657     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26658 
26659   path="$BOOT_JDK"
26660   has_colon=`$ECHO $path | $GREP ^.:`
26661   new_path="$path"
26662   if test "x$has_colon" = x; then
26663     # Not in mixed or Windows style, start by that.
26664     new_path=`cmd //c echo $path`
26665   fi
26666 
26667 
26668   input_path="$new_path"
26669   # Check if we need to convert this using DOS-style short mode. If the path
26670   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26671   # take no chances and rewrite it.
26672   # Note: m4 eats our [], so we need to use [ and ] instead.
26673   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26674   if test "x$has_forbidden_chars" != x; then
26675     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26676     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26677   fi
26678 
26679 
26680   windows_path="$new_path"
26681   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26682     unix_path=`$CYGPATH -u "$windows_path"`
26683     new_path="$unix_path"
26684   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26685     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26686     new_path="$unix_path"
26687   fi
26688 
26689   if test "x$path" != "x$new_path"; then
26690     BOOT_JDK="$new_path"
26691     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26692 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26693   fi
26694 
26695   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26696   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26697 
26698     else
26699       # We're on a unix platform. Hooray! :)
26700       path="$BOOT_JDK"
26701       has_space=`$ECHO "$path" | $GREP " "`
26702       if test "x$has_space" != x; then
26703         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26704 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26705         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26706       fi
26707 
26708       # Use eval to expand a potential ~
26709       eval path="$path"
26710       if test ! -f "$path" && test ! -d "$path"; then
26711         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26712       fi
26713 
26714       if test -d "$path"; then
26715         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26716       else
26717         dir="`$DIRNAME "$path"`"
26718         base="`$BASENAME "$path"`"
26719         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26720       fi
26721     fi
26722   fi
26723 
26724             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26725 $as_echo_n "checking for Boot JDK... " >&6; }
26726             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26727 $as_echo "$BOOT_JDK" >&6; }
26728             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26729 $as_echo_n "checking Boot JDK version... " >&6; }
26730             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26731             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26732 $as_echo "$BOOT_JDK_VERSION" >&6; }
26733           fi # end check jdk version
26734         fi # end check javac
26735       fi # end check java
26736     fi # end check boot jdk found
26737   fi
26738 
26739 
26740   # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
26741 
26742   if test "x$BOOT_JDK_FOUND" = xno; then
26743     # Now execute the test
26744 
26745   # Extract the first word of "javac", so it can be a program name with args.
26746 set dummy javac; ac_word=$2
26747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26748 $as_echo_n "checking for $ac_word... " >&6; }
26749 if ${ac_cv_path_JAVAC_CHECK+:} false; then :
26750   $as_echo_n "(cached) " >&6
26751 else
26752   case $JAVAC_CHECK in
26753   [\\/]* | ?:[\\/]*)
26754   ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
26755   ;;
26756   *)
26757   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26758 for as_dir in $PATH
26759 do
26760   IFS=$as_save_IFS
26761   test -z "$as_dir" && as_dir=.
26762     for ac_exec_ext in '' $ac_executable_extensions; do
26763   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26764     ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
26765     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26766     break 2
26767   fi
26768 done
26769   done
26770 IFS=$as_save_IFS
26771 
26772   ;;
26773 esac
26774 fi
26775 JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
26776 if test -n "$JAVAC_CHECK"; then
26777   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
26778 $as_echo "$JAVAC_CHECK" >&6; }
26779 else
26780   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26781 $as_echo "no" >&6; }
26782 fi
26783 
26784 
26785   # Extract the first word of "java", so it can be a program name with args.
26786 set dummy java; ac_word=$2
26787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26788 $as_echo_n "checking for $ac_word... " >&6; }
26789 if ${ac_cv_path_JAVA_CHECK+:} false; then :
26790   $as_echo_n "(cached) " >&6
26791 else
26792   case $JAVA_CHECK in
26793   [\\/]* | ?:[\\/]*)
26794   ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
26795   ;;
26796   *)
26797   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26798 for as_dir in $PATH
26799 do
26800   IFS=$as_save_IFS
26801   test -z "$as_dir" && as_dir=.
26802     for ac_exec_ext in '' $ac_executable_extensions; do
26803   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26804     ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
26805     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26806     break 2
26807   fi
26808 done
26809   done
26810 IFS=$as_save_IFS
26811 
26812   ;;
26813 esac
26814 fi
26815 JAVA_CHECK=$ac_cv_path_JAVA_CHECK
26816 if test -n "$JAVA_CHECK"; then
26817   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
26818 $as_echo "$JAVA_CHECK" >&6; }
26819 else
26820   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26821 $as_echo "no" >&6; }
26822 fi
26823 
26824 
26825   BINARY="$JAVAC_CHECK"
26826   if test "x$JAVAC_CHECK" = x; then
26827     BINARY="$JAVA_CHECK"
26828   fi
26829   if test "x$BINARY" != x; then
26830     # So there is a java(c) binary, it might be part of a JDK.
26831     # Lets find the JDK/JRE directory by following symbolic links.
26832     # Linux/GNU systems often have links from /usr/bin/java to
26833     # /etc/alternatives/java to the real JDK binary.
26834 
26835   if test "x$OPENJDK_BUILD_OS" != xwindows; then
26836     # Follow a chain of symbolic links. Use readlink
26837     # where it exists, else fall back to horribly
26838     # complicated shell code.
26839     if test "x$READLINK_TESTED" != yes; then
26840       # On MacOSX there is a readlink tool with a different
26841       # purpose than the GNU readlink tool. Check the found readlink.
26842       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
26843       if test "x$ISGNU" = x; then
26844         # A readlink that we do not know how to use.
26845         # Are there other non-GNU readlinks out there?
26846         READLINK_TESTED=yes
26847         READLINK=
26848       fi
26849     fi
26850 
26851     if test "x$READLINK" != x; then
26852       BINARY=`$READLINK -f $BINARY`
26853     else
26854       # Save the current directory for restoring afterwards
26855       STARTDIR=$PWD
26856       COUNTER=0
26857       sym_link_dir=`$DIRNAME $BINARY`
26858       sym_link_file=`$BASENAME $BINARY`
26859       cd $sym_link_dir
26860       # Use -P flag to resolve symlinks in directories.
26861       cd `$THEPWDCMD -P`
26862       sym_link_dir=`$THEPWDCMD -P`
26863       # Resolve file symlinks
26864       while test $COUNTER -lt 20; do
26865         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
26866         if test "x$ISLINK" == x; then
26867           # This is not a symbolic link! We are done!
26868           break
26869         fi
26870         # Again resolve directory symlinks since the target of the just found
26871         # link could be in a different directory
26872         cd `$DIRNAME $ISLINK`
26873         sym_link_dir=`$THEPWDCMD -P`
26874         sym_link_file=`$BASENAME $ISLINK`
26875         let COUNTER=COUNTER+1
26876       done
26877       cd $STARTDIR
26878       BINARY=$sym_link_dir/$sym_link_file
26879     fi
26880   fi
26881 
26882     BOOT_JDK=`dirname "$BINARY"`
26883     BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
26884     if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
26885       # Looks like we found ourselves an JDK
26886       BOOT_JDK_FOUND=maybe
26887       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
26888 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
26889     fi
26890   fi
26891 
26892 
26893     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26894     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26895       # Do we have a bin/java?
26896       if test ! -x "$BOOT_JDK/bin/java"; then
26897         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26898 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26899         BOOT_JDK_FOUND=no
26900       else
26901         # Do we have a bin/javac?
26902         if test ! -x "$BOOT_JDK/bin/javac"; then
26903           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26904 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26905           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26906 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26907           BOOT_JDK_FOUND=no
26908         else
26909           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26910           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26911 
26912           # Extra M4 quote needed to protect [] in grep expression.
26913           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26914           if test "x$FOUND_CORRECT_VERSION" = x; then
26915             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26916 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26917             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26918 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26919             BOOT_JDK_FOUND=no
26920           else
26921             # We're done! :-)
26922             BOOT_JDK_FOUND=yes
26923 
26924   # Only process if variable expands to non-empty
26925 
26926   if test "x$BOOT_JDK" != x; then
26927     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26928 
26929   # Input might be given as Windows format, start by converting to
26930   # unix format.
26931   path="$BOOT_JDK"
26932   new_path=`$CYGPATH -u "$path"`
26933 
26934   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26935   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26936   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26937   # "foo.exe" is OK but "foo" is an error.
26938   #
26939   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26940   # It is also a way to make sure we got the proper file name for the real test later on.
26941   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26942   if test "x$test_shortpath" = x; then
26943     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26944 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26945     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26946   fi
26947 
26948   # Call helper function which possibly converts this using DOS-style short mode.
26949   # If so, the updated path is stored in $new_path.
26950 
26951   input_path="$new_path"
26952   # Check if we need to convert this using DOS-style short mode. If the path
26953   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26954   # take no chances and rewrite it.
26955   # Note: m4 eats our [], so we need to use [ and ] instead.
26956   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26957   if test "x$has_forbidden_chars" != x; then
26958     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26959     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26960     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26961     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26962       # Going to short mode and back again did indeed matter. Since short mode is
26963       # case insensitive, let's make it lowercase to improve readability.
26964       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26965       # Now convert it back to Unix-style (cygpath)
26966       input_path=`$CYGPATH -u "$shortmode_path"`
26967       new_path="$input_path"
26968     fi
26969   fi
26970 
26971   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26972   if test "x$test_cygdrive_prefix" = x; then
26973     # As a simple fix, exclude /usr/bin since it's not a real path.
26974     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26975       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26976       # a path prefixed by /cygdrive for fixpath to work.
26977       new_path="$CYGWIN_ROOT_PATH$input_path"
26978     fi
26979   fi
26980 
26981 
26982   if test "x$path" != "x$new_path"; then
26983     BOOT_JDK="$new_path"
26984     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26985 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26986   fi
26987 
26988     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26989 
26990   path="$BOOT_JDK"
26991   has_colon=`$ECHO $path | $GREP ^.:`
26992   new_path="$path"
26993   if test "x$has_colon" = x; then
26994     # Not in mixed or Windows style, start by that.
26995     new_path=`cmd //c echo $path`
26996   fi
26997 
26998 
26999   input_path="$new_path"
27000   # Check if we need to convert this using DOS-style short mode. If the path
27001   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27002   # take no chances and rewrite it.
27003   # Note: m4 eats our [], so we need to use [ and ] instead.
27004   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27005   if test "x$has_forbidden_chars" != x; then
27006     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27007     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27008   fi
27009 
27010 
27011   windows_path="$new_path"
27012   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27013     unix_path=`$CYGPATH -u "$windows_path"`
27014     new_path="$unix_path"
27015   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27016     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27017     new_path="$unix_path"
27018   fi
27019 
27020   if test "x$path" != "x$new_path"; then
27021     BOOT_JDK="$new_path"
27022     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27023 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27024   fi
27025 
27026   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27027   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27028 
27029     else
27030       # We're on a unix platform. Hooray! :)
27031       path="$BOOT_JDK"
27032       has_space=`$ECHO "$path" | $GREP " "`
27033       if test "x$has_space" != x; then
27034         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27035 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27036         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27037       fi
27038 
27039       # Use eval to expand a potential ~
27040       eval path="$path"
27041       if test ! -f "$path" && test ! -d "$path"; then
27042         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27043       fi
27044 
27045       if test -d "$path"; then
27046         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27047       else
27048         dir="`$DIRNAME "$path"`"
27049         base="`$BASENAME "$path"`"
27050         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27051       fi
27052     fi
27053   fi
27054 
27055             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27056 $as_echo_n "checking for Boot JDK... " >&6; }
27057             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27058 $as_echo "$BOOT_JDK" >&6; }
27059             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27060 $as_echo_n "checking Boot JDK version... " >&6; }
27061             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27062             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27063 $as_echo "$BOOT_JDK_VERSION" >&6; }
27064           fi # end check jdk version
27065         fi # end check javac
27066       fi # end check java
27067     fi # end check boot jdk found
27068   fi
27069 
27070 
27071   # Test: Is there a JDK installed in default, well-known locations?
27072 
27073   if test "x$BOOT_JDK_FOUND" = xno; then
27074     # Now execute the test
27075 
27076   if test "x$OPENJDK_TARGET_OS" = xwindows; then
27077 
27078   if test "x$BOOT_JDK_FOUND" = xno; then
27079     # Now execute the test
27080 
27081   if test "x$ProgramW6432" != x; then
27082     VIRTUAL_DIR="$ProgramW6432/Java"
27083 
27084   windows_path="$VIRTUAL_DIR"
27085   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27086     unix_path=`$CYGPATH -u "$windows_path"`
27087     VIRTUAL_DIR="$unix_path"
27088   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27089     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27090     VIRTUAL_DIR="$unix_path"
27091   fi
27092 
27093 
27094   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27095   BOOT_JDK_SUFFIX=""
27096   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27097   if test "x$ALL_JDKS_FOUND" != x; then
27098     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27099 
27100   if test "x$BOOT_JDK_FOUND" = xno; then
27101     # Now execute the test
27102 
27103         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27104         if test -d "$BOOT_JDK"; then
27105           BOOT_JDK_FOUND=maybe
27106           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27107 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27108         fi
27109 
27110 
27111     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27112     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27113       # Do we have a bin/java?
27114       if test ! -x "$BOOT_JDK/bin/java"; then
27115         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27116 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27117         BOOT_JDK_FOUND=no
27118       else
27119         # Do we have a bin/javac?
27120         if test ! -x "$BOOT_JDK/bin/javac"; then
27121           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27122 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27123           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27124 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27125           BOOT_JDK_FOUND=no
27126         else
27127           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27128           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27129 
27130           # Extra M4 quote needed to protect [] in grep expression.
27131           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27132           if test "x$FOUND_CORRECT_VERSION" = x; then
27133             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27134 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27135             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27136 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27137             BOOT_JDK_FOUND=no
27138           else
27139             # We're done! :-)
27140             BOOT_JDK_FOUND=yes
27141 
27142   # Only process if variable expands to non-empty
27143 
27144   if test "x$BOOT_JDK" != x; then
27145     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27146 
27147   # Input might be given as Windows format, start by converting to
27148   # unix format.
27149   path="$BOOT_JDK"
27150   new_path=`$CYGPATH -u "$path"`
27151 
27152   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27153   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27154   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27155   # "foo.exe" is OK but "foo" is an error.
27156   #
27157   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27158   # It is also a way to make sure we got the proper file name for the real test later on.
27159   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27160   if test "x$test_shortpath" = x; then
27161     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27162 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27163     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27164   fi
27165 
27166   # Call helper function which possibly converts this using DOS-style short mode.
27167   # If so, the updated path is stored in $new_path.
27168 
27169   input_path="$new_path"
27170   # Check if we need to convert this using DOS-style short mode. If the path
27171   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27172   # take no chances and rewrite it.
27173   # Note: m4 eats our [], so we need to use [ and ] instead.
27174   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27175   if test "x$has_forbidden_chars" != x; then
27176     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27177     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27178     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27179     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27180       # Going to short mode and back again did indeed matter. Since short mode is
27181       # case insensitive, let's make it lowercase to improve readability.
27182       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27183       # Now convert it back to Unix-style (cygpath)
27184       input_path=`$CYGPATH -u "$shortmode_path"`
27185       new_path="$input_path"
27186     fi
27187   fi
27188 
27189   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27190   if test "x$test_cygdrive_prefix" = x; then
27191     # As a simple fix, exclude /usr/bin since it's not a real path.
27192     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27193       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27194       # a path prefixed by /cygdrive for fixpath to work.
27195       new_path="$CYGWIN_ROOT_PATH$input_path"
27196     fi
27197   fi
27198 
27199 
27200   if test "x$path" != "x$new_path"; then
27201     BOOT_JDK="$new_path"
27202     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27203 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27204   fi
27205 
27206     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27207 
27208   path="$BOOT_JDK"
27209   has_colon=`$ECHO $path | $GREP ^.:`
27210   new_path="$path"
27211   if test "x$has_colon" = x; then
27212     # Not in mixed or Windows style, start by that.
27213     new_path=`cmd //c echo $path`
27214   fi
27215 
27216 
27217   input_path="$new_path"
27218   # Check if we need to convert this using DOS-style short mode. If the path
27219   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27220   # take no chances and rewrite it.
27221   # Note: m4 eats our [], so we need to use [ and ] instead.
27222   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27223   if test "x$has_forbidden_chars" != x; then
27224     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27225     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27226   fi
27227 
27228 
27229   windows_path="$new_path"
27230   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27231     unix_path=`$CYGPATH -u "$windows_path"`
27232     new_path="$unix_path"
27233   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27234     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27235     new_path="$unix_path"
27236   fi
27237 
27238   if test "x$path" != "x$new_path"; then
27239     BOOT_JDK="$new_path"
27240     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27241 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27242   fi
27243 
27244   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27245   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27246 
27247     else
27248       # We're on a unix platform. Hooray! :)
27249       path="$BOOT_JDK"
27250       has_space=`$ECHO "$path" | $GREP " "`
27251       if test "x$has_space" != x; then
27252         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27253 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27254         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27255       fi
27256 
27257       # Use eval to expand a potential ~
27258       eval path="$path"
27259       if test ! -f "$path" && test ! -d "$path"; then
27260         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27261       fi
27262 
27263       if test -d "$path"; then
27264         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27265       else
27266         dir="`$DIRNAME "$path"`"
27267         base="`$BASENAME "$path"`"
27268         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27269       fi
27270     fi
27271   fi
27272 
27273             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27274 $as_echo_n "checking for Boot JDK... " >&6; }
27275             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27276 $as_echo "$BOOT_JDK" >&6; }
27277             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27278 $as_echo_n "checking Boot JDK version... " >&6; }
27279             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27280             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27281 $as_echo "$BOOT_JDK_VERSION" >&6; }
27282           fi # end check jdk version
27283         fi # end check javac
27284       fi # end check java
27285     fi # end check boot jdk found
27286   fi
27287 
27288     done
27289   fi
27290 
27291   fi
27292 
27293 
27294     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27295     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27296       # Do we have a bin/java?
27297       if test ! -x "$BOOT_JDK/bin/java"; then
27298         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27299 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27300         BOOT_JDK_FOUND=no
27301       else
27302         # Do we have a bin/javac?
27303         if test ! -x "$BOOT_JDK/bin/javac"; then
27304           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27305 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27306           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27307 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27308           BOOT_JDK_FOUND=no
27309         else
27310           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27311           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27312 
27313           # Extra M4 quote needed to protect [] in grep expression.
27314           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27315           if test "x$FOUND_CORRECT_VERSION" = x; then
27316             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27317 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27318             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27319 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27320             BOOT_JDK_FOUND=no
27321           else
27322             # We're done! :-)
27323             BOOT_JDK_FOUND=yes
27324 
27325   # Only process if variable expands to non-empty
27326 
27327   if test "x$BOOT_JDK" != x; then
27328     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27329 
27330   # Input might be given as Windows format, start by converting to
27331   # unix format.
27332   path="$BOOT_JDK"
27333   new_path=`$CYGPATH -u "$path"`
27334 
27335   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27336   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27337   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27338   # "foo.exe" is OK but "foo" is an error.
27339   #
27340   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27341   # It is also a way to make sure we got the proper file name for the real test later on.
27342   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27343   if test "x$test_shortpath" = x; then
27344     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27345 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27346     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27347   fi
27348 
27349   # Call helper function which possibly converts this using DOS-style short mode.
27350   # If so, the updated path is stored in $new_path.
27351 
27352   input_path="$new_path"
27353   # Check if we need to convert this using DOS-style short mode. If the path
27354   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27355   # take no chances and rewrite it.
27356   # Note: m4 eats our [], so we need to use [ and ] instead.
27357   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27358   if test "x$has_forbidden_chars" != x; then
27359     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27360     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27361     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27362     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27363       # Going to short mode and back again did indeed matter. Since short mode is
27364       # case insensitive, let's make it lowercase to improve readability.
27365       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27366       # Now convert it back to Unix-style (cygpath)
27367       input_path=`$CYGPATH -u "$shortmode_path"`
27368       new_path="$input_path"
27369     fi
27370   fi
27371 
27372   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27373   if test "x$test_cygdrive_prefix" = x; then
27374     # As a simple fix, exclude /usr/bin since it's not a real path.
27375     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27376       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27377       # a path prefixed by /cygdrive for fixpath to work.
27378       new_path="$CYGWIN_ROOT_PATH$input_path"
27379     fi
27380   fi
27381 
27382 
27383   if test "x$path" != "x$new_path"; then
27384     BOOT_JDK="$new_path"
27385     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27386 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27387   fi
27388 
27389     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27390 
27391   path="$BOOT_JDK"
27392   has_colon=`$ECHO $path | $GREP ^.:`
27393   new_path="$path"
27394   if test "x$has_colon" = x; then
27395     # Not in mixed or Windows style, start by that.
27396     new_path=`cmd //c echo $path`
27397   fi
27398 
27399 
27400   input_path="$new_path"
27401   # Check if we need to convert this using DOS-style short mode. If the path
27402   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27403   # take no chances and rewrite it.
27404   # Note: m4 eats our [], so we need to use [ and ] instead.
27405   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27406   if test "x$has_forbidden_chars" != x; then
27407     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27408     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27409   fi
27410 
27411 
27412   windows_path="$new_path"
27413   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27414     unix_path=`$CYGPATH -u "$windows_path"`
27415     new_path="$unix_path"
27416   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27417     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27418     new_path="$unix_path"
27419   fi
27420 
27421   if test "x$path" != "x$new_path"; then
27422     BOOT_JDK="$new_path"
27423     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27424 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27425   fi
27426 
27427   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27428   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27429 
27430     else
27431       # We're on a unix platform. Hooray! :)
27432       path="$BOOT_JDK"
27433       has_space=`$ECHO "$path" | $GREP " "`
27434       if test "x$has_space" != x; then
27435         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27436 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27437         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27438       fi
27439 
27440       # Use eval to expand a potential ~
27441       eval path="$path"
27442       if test ! -f "$path" && test ! -d "$path"; then
27443         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27444       fi
27445 
27446       if test -d "$path"; then
27447         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27448       else
27449         dir="`$DIRNAME "$path"`"
27450         base="`$BASENAME "$path"`"
27451         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27452       fi
27453     fi
27454   fi
27455 
27456             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27457 $as_echo_n "checking for Boot JDK... " >&6; }
27458             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27459 $as_echo "$BOOT_JDK" >&6; }
27460             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27461 $as_echo_n "checking Boot JDK version... " >&6; }
27462             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27463             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27464 $as_echo "$BOOT_JDK_VERSION" >&6; }
27465           fi # end check jdk version
27466         fi # end check javac
27467       fi # end check java
27468     fi # end check boot jdk found
27469   fi
27470 
27471 
27472   if test "x$BOOT_JDK_FOUND" = xno; then
27473     # Now execute the test
27474 
27475   if test "x$PROGRAMW6432" != x; then
27476     VIRTUAL_DIR="$PROGRAMW6432/Java"
27477 
27478   windows_path="$VIRTUAL_DIR"
27479   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27480     unix_path=`$CYGPATH -u "$windows_path"`
27481     VIRTUAL_DIR="$unix_path"
27482   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27483     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27484     VIRTUAL_DIR="$unix_path"
27485   fi
27486 
27487 
27488   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27489   BOOT_JDK_SUFFIX=""
27490   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27491   if test "x$ALL_JDKS_FOUND" != x; then
27492     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27493 
27494   if test "x$BOOT_JDK_FOUND" = xno; then
27495     # Now execute the test
27496 
27497         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27498         if test -d "$BOOT_JDK"; then
27499           BOOT_JDK_FOUND=maybe
27500           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27501 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27502         fi
27503 
27504 
27505     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27506     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27507       # Do we have a bin/java?
27508       if test ! -x "$BOOT_JDK/bin/java"; then
27509         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27510 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27511         BOOT_JDK_FOUND=no
27512       else
27513         # Do we have a bin/javac?
27514         if test ! -x "$BOOT_JDK/bin/javac"; then
27515           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27516 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27517           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27518 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27519           BOOT_JDK_FOUND=no
27520         else
27521           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27522           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27523 
27524           # Extra M4 quote needed to protect [] in grep expression.
27525           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27526           if test "x$FOUND_CORRECT_VERSION" = x; then
27527             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27528 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27529             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27530 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27531             BOOT_JDK_FOUND=no
27532           else
27533             # We're done! :-)
27534             BOOT_JDK_FOUND=yes
27535 
27536   # Only process if variable expands to non-empty
27537 
27538   if test "x$BOOT_JDK" != x; then
27539     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27540 
27541   # Input might be given as Windows format, start by converting to
27542   # unix format.
27543   path="$BOOT_JDK"
27544   new_path=`$CYGPATH -u "$path"`
27545 
27546   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27547   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27548   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27549   # "foo.exe" is OK but "foo" is an error.
27550   #
27551   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27552   # It is also a way to make sure we got the proper file name for the real test later on.
27553   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27554   if test "x$test_shortpath" = x; then
27555     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27556 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27557     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27558   fi
27559 
27560   # Call helper function which possibly converts this using DOS-style short mode.
27561   # If so, the updated path is stored in $new_path.
27562 
27563   input_path="$new_path"
27564   # Check if we need to convert this using DOS-style short mode. If the path
27565   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27566   # take no chances and rewrite it.
27567   # Note: m4 eats our [], so we need to use [ and ] instead.
27568   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27569   if test "x$has_forbidden_chars" != x; then
27570     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27571     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27572     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27573     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27574       # Going to short mode and back again did indeed matter. Since short mode is
27575       # case insensitive, let's make it lowercase to improve readability.
27576       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27577       # Now convert it back to Unix-style (cygpath)
27578       input_path=`$CYGPATH -u "$shortmode_path"`
27579       new_path="$input_path"
27580     fi
27581   fi
27582 
27583   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27584   if test "x$test_cygdrive_prefix" = x; then
27585     # As a simple fix, exclude /usr/bin since it's not a real path.
27586     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27587       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27588       # a path prefixed by /cygdrive for fixpath to work.
27589       new_path="$CYGWIN_ROOT_PATH$input_path"
27590     fi
27591   fi
27592 
27593 
27594   if test "x$path" != "x$new_path"; then
27595     BOOT_JDK="$new_path"
27596     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27597 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27598   fi
27599 
27600     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27601 
27602   path="$BOOT_JDK"
27603   has_colon=`$ECHO $path | $GREP ^.:`
27604   new_path="$path"
27605   if test "x$has_colon" = x; then
27606     # Not in mixed or Windows style, start by that.
27607     new_path=`cmd //c echo $path`
27608   fi
27609 
27610 
27611   input_path="$new_path"
27612   # Check if we need to convert this using DOS-style short mode. If the path
27613   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27614   # take no chances and rewrite it.
27615   # Note: m4 eats our [], so we need to use [ and ] instead.
27616   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27617   if test "x$has_forbidden_chars" != x; then
27618     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27619     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27620   fi
27621 
27622 
27623   windows_path="$new_path"
27624   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27625     unix_path=`$CYGPATH -u "$windows_path"`
27626     new_path="$unix_path"
27627   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27628     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27629     new_path="$unix_path"
27630   fi
27631 
27632   if test "x$path" != "x$new_path"; then
27633     BOOT_JDK="$new_path"
27634     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27635 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27636   fi
27637 
27638   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27639   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27640 
27641     else
27642       # We're on a unix platform. Hooray! :)
27643       path="$BOOT_JDK"
27644       has_space=`$ECHO "$path" | $GREP " "`
27645       if test "x$has_space" != x; then
27646         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27647 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27648         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27649       fi
27650 
27651       # Use eval to expand a potential ~
27652       eval path="$path"
27653       if test ! -f "$path" && test ! -d "$path"; then
27654         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27655       fi
27656 
27657       if test -d "$path"; then
27658         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27659       else
27660         dir="`$DIRNAME "$path"`"
27661         base="`$BASENAME "$path"`"
27662         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27663       fi
27664     fi
27665   fi
27666 
27667             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27668 $as_echo_n "checking for Boot JDK... " >&6; }
27669             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27670 $as_echo "$BOOT_JDK" >&6; }
27671             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27672 $as_echo_n "checking Boot JDK version... " >&6; }
27673             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27674             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27675 $as_echo "$BOOT_JDK_VERSION" >&6; }
27676           fi # end check jdk version
27677         fi # end check javac
27678       fi # end check java
27679     fi # end check boot jdk found
27680   fi
27681 
27682     done
27683   fi
27684 
27685   fi
27686 
27687 
27688     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27689     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27690       # Do we have a bin/java?
27691       if test ! -x "$BOOT_JDK/bin/java"; then
27692         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27693 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27694         BOOT_JDK_FOUND=no
27695       else
27696         # Do we have a bin/javac?
27697         if test ! -x "$BOOT_JDK/bin/javac"; then
27698           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27699 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27700           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27701 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27702           BOOT_JDK_FOUND=no
27703         else
27704           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27705           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27706 
27707           # Extra M4 quote needed to protect [] in grep expression.
27708           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27709           if test "x$FOUND_CORRECT_VERSION" = x; then
27710             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27711 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27712             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27713 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27714             BOOT_JDK_FOUND=no
27715           else
27716             # We're done! :-)
27717             BOOT_JDK_FOUND=yes
27718 
27719   # Only process if variable expands to non-empty
27720 
27721   if test "x$BOOT_JDK" != x; then
27722     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27723 
27724   # Input might be given as Windows format, start by converting to
27725   # unix format.
27726   path="$BOOT_JDK"
27727   new_path=`$CYGPATH -u "$path"`
27728 
27729   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27730   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27731   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27732   # "foo.exe" is OK but "foo" is an error.
27733   #
27734   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27735   # It is also a way to make sure we got the proper file name for the real test later on.
27736   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27737   if test "x$test_shortpath" = x; then
27738     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27739 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27740     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27741   fi
27742 
27743   # Call helper function which possibly converts this using DOS-style short mode.
27744   # If so, the updated path is stored in $new_path.
27745 
27746   input_path="$new_path"
27747   # Check if we need to convert this using DOS-style short mode. If the path
27748   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27749   # take no chances and rewrite it.
27750   # Note: m4 eats our [], so we need to use [ and ] instead.
27751   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27752   if test "x$has_forbidden_chars" != x; then
27753     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27754     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27755     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27756     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27757       # Going to short mode and back again did indeed matter. Since short mode is
27758       # case insensitive, let's make it lowercase to improve readability.
27759       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27760       # Now convert it back to Unix-style (cygpath)
27761       input_path=`$CYGPATH -u "$shortmode_path"`
27762       new_path="$input_path"
27763     fi
27764   fi
27765 
27766   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27767   if test "x$test_cygdrive_prefix" = x; then
27768     # As a simple fix, exclude /usr/bin since it's not a real path.
27769     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27770       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27771       # a path prefixed by /cygdrive for fixpath to work.
27772       new_path="$CYGWIN_ROOT_PATH$input_path"
27773     fi
27774   fi
27775 
27776 
27777   if test "x$path" != "x$new_path"; then
27778     BOOT_JDK="$new_path"
27779     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27780 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27781   fi
27782 
27783     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27784 
27785   path="$BOOT_JDK"
27786   has_colon=`$ECHO $path | $GREP ^.:`
27787   new_path="$path"
27788   if test "x$has_colon" = x; then
27789     # Not in mixed or Windows style, start by that.
27790     new_path=`cmd //c echo $path`
27791   fi
27792 
27793 
27794   input_path="$new_path"
27795   # Check if we need to convert this using DOS-style short mode. If the path
27796   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27797   # take no chances and rewrite it.
27798   # Note: m4 eats our [], so we need to use [ and ] instead.
27799   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27800   if test "x$has_forbidden_chars" != x; then
27801     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27802     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27803   fi
27804 
27805 
27806   windows_path="$new_path"
27807   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27808     unix_path=`$CYGPATH -u "$windows_path"`
27809     new_path="$unix_path"
27810   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27811     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27812     new_path="$unix_path"
27813   fi
27814 
27815   if test "x$path" != "x$new_path"; then
27816     BOOT_JDK="$new_path"
27817     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27818 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27819   fi
27820 
27821   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27822   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27823 
27824     else
27825       # We're on a unix platform. Hooray! :)
27826       path="$BOOT_JDK"
27827       has_space=`$ECHO "$path" | $GREP " "`
27828       if test "x$has_space" != x; then
27829         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27830 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27831         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27832       fi
27833 
27834       # Use eval to expand a potential ~
27835       eval path="$path"
27836       if test ! -f "$path" && test ! -d "$path"; then
27837         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27838       fi
27839 
27840       if test -d "$path"; then
27841         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27842       else
27843         dir="`$DIRNAME "$path"`"
27844         base="`$BASENAME "$path"`"
27845         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27846       fi
27847     fi
27848   fi
27849 
27850             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27851 $as_echo_n "checking for Boot JDK... " >&6; }
27852             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27853 $as_echo "$BOOT_JDK" >&6; }
27854             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27855 $as_echo_n "checking Boot JDK version... " >&6; }
27856             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27857             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27858 $as_echo "$BOOT_JDK_VERSION" >&6; }
27859           fi # end check jdk version
27860         fi # end check javac
27861       fi # end check java
27862     fi # end check boot jdk found
27863   fi
27864 
27865 
27866   if test "x$BOOT_JDK_FOUND" = xno; then
27867     # Now execute the test
27868 
27869   if test "x$PROGRAMFILES" != x; then
27870     VIRTUAL_DIR="$PROGRAMFILES/Java"
27871 
27872   windows_path="$VIRTUAL_DIR"
27873   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27874     unix_path=`$CYGPATH -u "$windows_path"`
27875     VIRTUAL_DIR="$unix_path"
27876   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27877     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27878     VIRTUAL_DIR="$unix_path"
27879   fi
27880 
27881 
27882   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27883   BOOT_JDK_SUFFIX=""
27884   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27885   if test "x$ALL_JDKS_FOUND" != x; then
27886     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27887 
27888   if test "x$BOOT_JDK_FOUND" = xno; then
27889     # Now execute the test
27890 
27891         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27892         if test -d "$BOOT_JDK"; then
27893           BOOT_JDK_FOUND=maybe
27894           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27895 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27896         fi
27897 
27898 
27899     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27900     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27901       # Do we have a bin/java?
27902       if test ! -x "$BOOT_JDK/bin/java"; then
27903         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27904 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27905         BOOT_JDK_FOUND=no
27906       else
27907         # Do we have a bin/javac?
27908         if test ! -x "$BOOT_JDK/bin/javac"; then
27909           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27910 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27911           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27912 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27913           BOOT_JDK_FOUND=no
27914         else
27915           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27916           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27917 
27918           # Extra M4 quote needed to protect [] in grep expression.
27919           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27920           if test "x$FOUND_CORRECT_VERSION" = x; then
27921             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27922 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27923             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27924 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27925             BOOT_JDK_FOUND=no
27926           else
27927             # We're done! :-)
27928             BOOT_JDK_FOUND=yes
27929 
27930   # Only process if variable expands to non-empty
27931 
27932   if test "x$BOOT_JDK" != x; then
27933     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27934 
27935   # Input might be given as Windows format, start by converting to
27936   # unix format.
27937   path="$BOOT_JDK"
27938   new_path=`$CYGPATH -u "$path"`
27939 
27940   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27941   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27942   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27943   # "foo.exe" is OK but "foo" is an error.
27944   #
27945   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27946   # It is also a way to make sure we got the proper file name for the real test later on.
27947   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27948   if test "x$test_shortpath" = x; then
27949     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27950 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27951     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27952   fi
27953 
27954   # Call helper function which possibly converts this using DOS-style short mode.
27955   # If so, the updated path is stored in $new_path.
27956 
27957   input_path="$new_path"
27958   # Check if we need to convert this using DOS-style short mode. If the path
27959   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27960   # take no chances and rewrite it.
27961   # Note: m4 eats our [], so we need to use [ and ] instead.
27962   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27963   if test "x$has_forbidden_chars" != x; then
27964     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27965     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27966     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27967     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27968       # Going to short mode and back again did indeed matter. Since short mode is
27969       # case insensitive, let's make it lowercase to improve readability.
27970       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27971       # Now convert it back to Unix-style (cygpath)
27972       input_path=`$CYGPATH -u "$shortmode_path"`
27973       new_path="$input_path"
27974     fi
27975   fi
27976 
27977   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27978   if test "x$test_cygdrive_prefix" = x; then
27979     # As a simple fix, exclude /usr/bin since it's not a real path.
27980     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27981       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27982       # a path prefixed by /cygdrive for fixpath to work.
27983       new_path="$CYGWIN_ROOT_PATH$input_path"
27984     fi
27985   fi
27986 
27987 
27988   if test "x$path" != "x$new_path"; then
27989     BOOT_JDK="$new_path"
27990     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27991 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27992   fi
27993 
27994     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27995 
27996   path="$BOOT_JDK"
27997   has_colon=`$ECHO $path | $GREP ^.:`
27998   new_path="$path"
27999   if test "x$has_colon" = x; then
28000     # Not in mixed or Windows style, start by that.
28001     new_path=`cmd //c echo $path`
28002   fi
28003 
28004 
28005   input_path="$new_path"
28006   # Check if we need to convert this using DOS-style short mode. If the path
28007   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28008   # take no chances and rewrite it.
28009   # Note: m4 eats our [], so we need to use [ and ] instead.
28010   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28011   if test "x$has_forbidden_chars" != x; then
28012     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28013     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28014   fi
28015 
28016 
28017   windows_path="$new_path"
28018   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28019     unix_path=`$CYGPATH -u "$windows_path"`
28020     new_path="$unix_path"
28021   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28022     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28023     new_path="$unix_path"
28024   fi
28025 
28026   if test "x$path" != "x$new_path"; then
28027     BOOT_JDK="$new_path"
28028     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28029 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28030   fi
28031 
28032   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28033   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28034 
28035     else
28036       # We're on a unix platform. Hooray! :)
28037       path="$BOOT_JDK"
28038       has_space=`$ECHO "$path" | $GREP " "`
28039       if test "x$has_space" != x; then
28040         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28041 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28042         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28043       fi
28044 
28045       # Use eval to expand a potential ~
28046       eval path="$path"
28047       if test ! -f "$path" && test ! -d "$path"; then
28048         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28049       fi
28050 
28051       if test -d "$path"; then
28052         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28053       else
28054         dir="`$DIRNAME "$path"`"
28055         base="`$BASENAME "$path"`"
28056         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28057       fi
28058     fi
28059   fi
28060 
28061             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28062 $as_echo_n "checking for Boot JDK... " >&6; }
28063             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28064 $as_echo "$BOOT_JDK" >&6; }
28065             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28066 $as_echo_n "checking Boot JDK version... " >&6; }
28067             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28068             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28069 $as_echo "$BOOT_JDK_VERSION" >&6; }
28070           fi # end check jdk version
28071         fi # end check javac
28072       fi # end check java
28073     fi # end check boot jdk found
28074   fi
28075 
28076     done
28077   fi
28078 
28079   fi
28080 
28081 
28082     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28083     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28084       # Do we have a bin/java?
28085       if test ! -x "$BOOT_JDK/bin/java"; then
28086         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28087 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28088         BOOT_JDK_FOUND=no
28089       else
28090         # Do we have a bin/javac?
28091         if test ! -x "$BOOT_JDK/bin/javac"; then
28092           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28093 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28094           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28095 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28096           BOOT_JDK_FOUND=no
28097         else
28098           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28099           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28100 
28101           # Extra M4 quote needed to protect [] in grep expression.
28102           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28103           if test "x$FOUND_CORRECT_VERSION" = x; then
28104             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28105 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28106             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28107 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28108             BOOT_JDK_FOUND=no
28109           else
28110             # We're done! :-)
28111             BOOT_JDK_FOUND=yes
28112 
28113   # Only process if variable expands to non-empty
28114 
28115   if test "x$BOOT_JDK" != x; then
28116     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28117 
28118   # Input might be given as Windows format, start by converting to
28119   # unix format.
28120   path="$BOOT_JDK"
28121   new_path=`$CYGPATH -u "$path"`
28122 
28123   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28124   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28125   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28126   # "foo.exe" is OK but "foo" is an error.
28127   #
28128   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28129   # It is also a way to make sure we got the proper file name for the real test later on.
28130   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28131   if test "x$test_shortpath" = x; then
28132     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28133 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28134     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28135   fi
28136 
28137   # Call helper function which possibly converts this using DOS-style short mode.
28138   # If so, the updated path is stored in $new_path.
28139 
28140   input_path="$new_path"
28141   # Check if we need to convert this using DOS-style short mode. If the path
28142   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28143   # take no chances and rewrite it.
28144   # Note: m4 eats our [], so we need to use [ and ] instead.
28145   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28146   if test "x$has_forbidden_chars" != x; then
28147     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28148     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28149     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28150     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28151       # Going to short mode and back again did indeed matter. Since short mode is
28152       # case insensitive, let's make it lowercase to improve readability.
28153       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28154       # Now convert it back to Unix-style (cygpath)
28155       input_path=`$CYGPATH -u "$shortmode_path"`
28156       new_path="$input_path"
28157     fi
28158   fi
28159 
28160   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28161   if test "x$test_cygdrive_prefix" = x; then
28162     # As a simple fix, exclude /usr/bin since it's not a real path.
28163     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28164       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28165       # a path prefixed by /cygdrive for fixpath to work.
28166       new_path="$CYGWIN_ROOT_PATH$input_path"
28167     fi
28168   fi
28169 
28170 
28171   if test "x$path" != "x$new_path"; then
28172     BOOT_JDK="$new_path"
28173     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28174 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28175   fi
28176 
28177     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28178 
28179   path="$BOOT_JDK"
28180   has_colon=`$ECHO $path | $GREP ^.:`
28181   new_path="$path"
28182   if test "x$has_colon" = x; then
28183     # Not in mixed or Windows style, start by that.
28184     new_path=`cmd //c echo $path`
28185   fi
28186 
28187 
28188   input_path="$new_path"
28189   # Check if we need to convert this using DOS-style short mode. If the path
28190   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28191   # take no chances and rewrite it.
28192   # Note: m4 eats our [], so we need to use [ and ] instead.
28193   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28194   if test "x$has_forbidden_chars" != x; then
28195     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28196     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28197   fi
28198 
28199 
28200   windows_path="$new_path"
28201   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28202     unix_path=`$CYGPATH -u "$windows_path"`
28203     new_path="$unix_path"
28204   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28205     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28206     new_path="$unix_path"
28207   fi
28208 
28209   if test "x$path" != "x$new_path"; then
28210     BOOT_JDK="$new_path"
28211     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28212 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28213   fi
28214 
28215   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28216   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28217 
28218     else
28219       # We're on a unix platform. Hooray! :)
28220       path="$BOOT_JDK"
28221       has_space=`$ECHO "$path" | $GREP " "`
28222       if test "x$has_space" != x; then
28223         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28224 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28225         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28226       fi
28227 
28228       # Use eval to expand a potential ~
28229       eval path="$path"
28230       if test ! -f "$path" && test ! -d "$path"; then
28231         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28232       fi
28233 
28234       if test -d "$path"; then
28235         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28236       else
28237         dir="`$DIRNAME "$path"`"
28238         base="`$BASENAME "$path"`"
28239         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28240       fi
28241     fi
28242   fi
28243 
28244             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28245 $as_echo_n "checking for Boot JDK... " >&6; }
28246             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28247 $as_echo "$BOOT_JDK" >&6; }
28248             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28249 $as_echo_n "checking Boot JDK version... " >&6; }
28250             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28251             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28252 $as_echo "$BOOT_JDK_VERSION" >&6; }
28253           fi # end check jdk version
28254         fi # end check javac
28255       fi # end check java
28256     fi # end check boot jdk found
28257   fi
28258 
28259 
28260   if test "x$BOOT_JDK_FOUND" = xno; then
28261     # Now execute the test
28262 
28263   if test "x$ProgramFiles" != x; then
28264     VIRTUAL_DIR="$ProgramFiles/Java"
28265 
28266   windows_path="$VIRTUAL_DIR"
28267   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28268     unix_path=`$CYGPATH -u "$windows_path"`
28269     VIRTUAL_DIR="$unix_path"
28270   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28271     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28272     VIRTUAL_DIR="$unix_path"
28273   fi
28274 
28275 
28276   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
28277   BOOT_JDK_SUFFIX=""
28278   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28279   if test "x$ALL_JDKS_FOUND" != x; then
28280     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28281 
28282   if test "x$BOOT_JDK_FOUND" = xno; then
28283     # Now execute the test
28284 
28285         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28286         if test -d "$BOOT_JDK"; then
28287           BOOT_JDK_FOUND=maybe
28288           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28289 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28290         fi
28291 
28292 
28293     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28294     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28295       # Do we have a bin/java?
28296       if test ! -x "$BOOT_JDK/bin/java"; then
28297         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28298 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28299         BOOT_JDK_FOUND=no
28300       else
28301         # Do we have a bin/javac?
28302         if test ! -x "$BOOT_JDK/bin/javac"; then
28303           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28304 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28305           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28306 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28307           BOOT_JDK_FOUND=no
28308         else
28309           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28310           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28311 
28312           # Extra M4 quote needed to protect [] in grep expression.
28313           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28314           if test "x$FOUND_CORRECT_VERSION" = x; then
28315             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28316 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28317             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28318 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28319             BOOT_JDK_FOUND=no
28320           else
28321             # We're done! :-)
28322             BOOT_JDK_FOUND=yes
28323 
28324   # Only process if variable expands to non-empty
28325 
28326   if test "x$BOOT_JDK" != x; then
28327     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28328 
28329   # Input might be given as Windows format, start by converting to
28330   # unix format.
28331   path="$BOOT_JDK"
28332   new_path=`$CYGPATH -u "$path"`
28333 
28334   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28335   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28336   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28337   # "foo.exe" is OK but "foo" is an error.
28338   #
28339   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28340   # It is also a way to make sure we got the proper file name for the real test later on.
28341   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28342   if test "x$test_shortpath" = x; then
28343     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28344 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28345     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28346   fi
28347 
28348   # Call helper function which possibly converts this using DOS-style short mode.
28349   # If so, the updated path is stored in $new_path.
28350 
28351   input_path="$new_path"
28352   # Check if we need to convert this using DOS-style short mode. If the path
28353   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28354   # take no chances and rewrite it.
28355   # Note: m4 eats our [], so we need to use [ and ] instead.
28356   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28357   if test "x$has_forbidden_chars" != x; then
28358     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28359     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28360     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28361     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28362       # Going to short mode and back again did indeed matter. Since short mode is
28363       # case insensitive, let's make it lowercase to improve readability.
28364       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28365       # Now convert it back to Unix-style (cygpath)
28366       input_path=`$CYGPATH -u "$shortmode_path"`
28367       new_path="$input_path"
28368     fi
28369   fi
28370 
28371   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28372   if test "x$test_cygdrive_prefix" = x; then
28373     # As a simple fix, exclude /usr/bin since it's not a real path.
28374     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28375       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28376       # a path prefixed by /cygdrive for fixpath to work.
28377       new_path="$CYGWIN_ROOT_PATH$input_path"
28378     fi
28379   fi
28380 
28381 
28382   if test "x$path" != "x$new_path"; then
28383     BOOT_JDK="$new_path"
28384     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28385 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28386   fi
28387 
28388     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28389 
28390   path="$BOOT_JDK"
28391   has_colon=`$ECHO $path | $GREP ^.:`
28392   new_path="$path"
28393   if test "x$has_colon" = x; then
28394     # Not in mixed or Windows style, start by that.
28395     new_path=`cmd //c echo $path`
28396   fi
28397 
28398 
28399   input_path="$new_path"
28400   # Check if we need to convert this using DOS-style short mode. If the path
28401   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28402   # take no chances and rewrite it.
28403   # Note: m4 eats our [], so we need to use [ and ] instead.
28404   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28405   if test "x$has_forbidden_chars" != x; then
28406     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28407     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28408   fi
28409 
28410 
28411   windows_path="$new_path"
28412   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28413     unix_path=`$CYGPATH -u "$windows_path"`
28414     new_path="$unix_path"
28415   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28416     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28417     new_path="$unix_path"
28418   fi
28419 
28420   if test "x$path" != "x$new_path"; then
28421     BOOT_JDK="$new_path"
28422     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28423 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28424   fi
28425 
28426   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28427   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28428 
28429     else
28430       # We're on a unix platform. Hooray! :)
28431       path="$BOOT_JDK"
28432       has_space=`$ECHO "$path" | $GREP " "`
28433       if test "x$has_space" != x; then
28434         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28435 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28436         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28437       fi
28438 
28439       # Use eval to expand a potential ~
28440       eval path="$path"
28441       if test ! -f "$path" && test ! -d "$path"; then
28442         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28443       fi
28444 
28445       if test -d "$path"; then
28446         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28447       else
28448         dir="`$DIRNAME "$path"`"
28449         base="`$BASENAME "$path"`"
28450         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28451       fi
28452     fi
28453   fi
28454 
28455             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28456 $as_echo_n "checking for Boot JDK... " >&6; }
28457             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28458 $as_echo "$BOOT_JDK" >&6; }
28459             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28460 $as_echo_n "checking Boot JDK version... " >&6; }
28461             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28462             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28463 $as_echo "$BOOT_JDK_VERSION" >&6; }
28464           fi # end check jdk version
28465         fi # end check javac
28466       fi # end check java
28467     fi # end check boot jdk found
28468   fi
28469 
28470     done
28471   fi
28472 
28473   fi
28474 
28475 
28476     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28477     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28478       # Do we have a bin/java?
28479       if test ! -x "$BOOT_JDK/bin/java"; then
28480         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28481 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28482         BOOT_JDK_FOUND=no
28483       else
28484         # Do we have a bin/javac?
28485         if test ! -x "$BOOT_JDK/bin/javac"; then
28486           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28487 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28488           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28489 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28490           BOOT_JDK_FOUND=no
28491         else
28492           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28493           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28494 
28495           # Extra M4 quote needed to protect [] in grep expression.
28496           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28497           if test "x$FOUND_CORRECT_VERSION" = x; then
28498             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28499 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28500             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28501 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28502             BOOT_JDK_FOUND=no
28503           else
28504             # We're done! :-)
28505             BOOT_JDK_FOUND=yes
28506 
28507   # Only process if variable expands to non-empty
28508 
28509   if test "x$BOOT_JDK" != x; then
28510     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28511 
28512   # Input might be given as Windows format, start by converting to
28513   # unix format.
28514   path="$BOOT_JDK"
28515   new_path=`$CYGPATH -u "$path"`
28516 
28517   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28518   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28519   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28520   # "foo.exe" is OK but "foo" is an error.
28521   #
28522   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28523   # It is also a way to make sure we got the proper file name for the real test later on.
28524   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28525   if test "x$test_shortpath" = x; then
28526     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28527 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28528     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28529   fi
28530 
28531   # Call helper function which possibly converts this using DOS-style short mode.
28532   # If so, the updated path is stored in $new_path.
28533 
28534   input_path="$new_path"
28535   # Check if we need to convert this using DOS-style short mode. If the path
28536   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28537   # take no chances and rewrite it.
28538   # Note: m4 eats our [], so we need to use [ and ] instead.
28539   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28540   if test "x$has_forbidden_chars" != x; then
28541     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28542     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28543     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28544     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28545       # Going to short mode and back again did indeed matter. Since short mode is
28546       # case insensitive, let's make it lowercase to improve readability.
28547       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28548       # Now convert it back to Unix-style (cygpath)
28549       input_path=`$CYGPATH -u "$shortmode_path"`
28550       new_path="$input_path"
28551     fi
28552   fi
28553 
28554   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28555   if test "x$test_cygdrive_prefix" = x; then
28556     # As a simple fix, exclude /usr/bin since it's not a real path.
28557     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28558       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28559       # a path prefixed by /cygdrive for fixpath to work.
28560       new_path="$CYGWIN_ROOT_PATH$input_path"
28561     fi
28562   fi
28563 
28564 
28565   if test "x$path" != "x$new_path"; then
28566     BOOT_JDK="$new_path"
28567     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28568 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28569   fi
28570 
28571     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28572 
28573   path="$BOOT_JDK"
28574   has_colon=`$ECHO $path | $GREP ^.:`
28575   new_path="$path"
28576   if test "x$has_colon" = x; then
28577     # Not in mixed or Windows style, start by that.
28578     new_path=`cmd //c echo $path`
28579   fi
28580 
28581 
28582   input_path="$new_path"
28583   # Check if we need to convert this using DOS-style short mode. If the path
28584   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28585   # take no chances and rewrite it.
28586   # Note: m4 eats our [], so we need to use [ and ] instead.
28587   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28588   if test "x$has_forbidden_chars" != x; then
28589     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28590     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28591   fi
28592 
28593 
28594   windows_path="$new_path"
28595   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28596     unix_path=`$CYGPATH -u "$windows_path"`
28597     new_path="$unix_path"
28598   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28599     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28600     new_path="$unix_path"
28601   fi
28602 
28603   if test "x$path" != "x$new_path"; then
28604     BOOT_JDK="$new_path"
28605     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28606 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28607   fi
28608 
28609   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28610   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28611 
28612     else
28613       # We're on a unix platform. Hooray! :)
28614       path="$BOOT_JDK"
28615       has_space=`$ECHO "$path" | $GREP " "`
28616       if test "x$has_space" != x; then
28617         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28618 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28619         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28620       fi
28621 
28622       # Use eval to expand a potential ~
28623       eval path="$path"
28624       if test ! -f "$path" && test ! -d "$path"; then
28625         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28626       fi
28627 
28628       if test -d "$path"; then
28629         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28630       else
28631         dir="`$DIRNAME "$path"`"
28632         base="`$BASENAME "$path"`"
28633         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28634       fi
28635     fi
28636   fi
28637 
28638             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28639 $as_echo_n "checking for Boot JDK... " >&6; }
28640             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28641 $as_echo "$BOOT_JDK" >&6; }
28642             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28643 $as_echo_n "checking Boot JDK version... " >&6; }
28644             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28645             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28646 $as_echo "$BOOT_JDK_VERSION" >&6; }
28647           fi # end check jdk version
28648         fi # end check javac
28649       fi # end check java
28650     fi # end check boot jdk found
28651   fi
28652 
28653 
28654   if test "x$BOOT_JDK_FOUND" = xno; then
28655     # Now execute the test
28656 
28657   BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
28658   BOOT_JDK_SUFFIX=""
28659   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28660   if test "x$ALL_JDKS_FOUND" != x; then
28661     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28662 
28663   if test "x$BOOT_JDK_FOUND" = xno; then
28664     # Now execute the test
28665 
28666         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28667         if test -d "$BOOT_JDK"; then
28668           BOOT_JDK_FOUND=maybe
28669           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28670 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28671         fi
28672 
28673 
28674     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28675     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28676       # Do we have a bin/java?
28677       if test ! -x "$BOOT_JDK/bin/java"; then
28678         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28679 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28680         BOOT_JDK_FOUND=no
28681       else
28682         # Do we have a bin/javac?
28683         if test ! -x "$BOOT_JDK/bin/javac"; then
28684           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28685 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28686           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28687 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28688           BOOT_JDK_FOUND=no
28689         else
28690           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28691           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28692 
28693           # Extra M4 quote needed to protect [] in grep expression.
28694           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28695           if test "x$FOUND_CORRECT_VERSION" = x; then
28696             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28697 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28698             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28699 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28700             BOOT_JDK_FOUND=no
28701           else
28702             # We're done! :-)
28703             BOOT_JDK_FOUND=yes
28704 
28705   # Only process if variable expands to non-empty
28706 
28707   if test "x$BOOT_JDK" != x; then
28708     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28709 
28710   # Input might be given as Windows format, start by converting to
28711   # unix format.
28712   path="$BOOT_JDK"
28713   new_path=`$CYGPATH -u "$path"`
28714 
28715   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28716   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28717   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28718   # "foo.exe" is OK but "foo" is an error.
28719   #
28720   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28721   # It is also a way to make sure we got the proper file name for the real test later on.
28722   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28723   if test "x$test_shortpath" = x; then
28724     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28725 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28726     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28727   fi
28728 
28729   # Call helper function which possibly converts this using DOS-style short mode.
28730   # If so, the updated path is stored in $new_path.
28731 
28732   input_path="$new_path"
28733   # Check if we need to convert this using DOS-style short mode. If the path
28734   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28735   # take no chances and rewrite it.
28736   # Note: m4 eats our [], so we need to use [ and ] instead.
28737   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28738   if test "x$has_forbidden_chars" != x; then
28739     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28740     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28741     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28742     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28743       # Going to short mode and back again did indeed matter. Since short mode is
28744       # case insensitive, let's make it lowercase to improve readability.
28745       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28746       # Now convert it back to Unix-style (cygpath)
28747       input_path=`$CYGPATH -u "$shortmode_path"`
28748       new_path="$input_path"
28749     fi
28750   fi
28751 
28752   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28753   if test "x$test_cygdrive_prefix" = x; then
28754     # As a simple fix, exclude /usr/bin since it's not a real path.
28755     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28756       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28757       # a path prefixed by /cygdrive for fixpath to work.
28758       new_path="$CYGWIN_ROOT_PATH$input_path"
28759     fi
28760   fi
28761 
28762 
28763   if test "x$path" != "x$new_path"; then
28764     BOOT_JDK="$new_path"
28765     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28766 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28767   fi
28768 
28769     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28770 
28771   path="$BOOT_JDK"
28772   has_colon=`$ECHO $path | $GREP ^.:`
28773   new_path="$path"
28774   if test "x$has_colon" = x; then
28775     # Not in mixed or Windows style, start by that.
28776     new_path=`cmd //c echo $path`
28777   fi
28778 
28779 
28780   input_path="$new_path"
28781   # Check if we need to convert this using DOS-style short mode. If the path
28782   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28783   # take no chances and rewrite it.
28784   # Note: m4 eats our [], so we need to use [ and ] instead.
28785   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28786   if test "x$has_forbidden_chars" != x; then
28787     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28788     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28789   fi
28790 
28791 
28792   windows_path="$new_path"
28793   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28794     unix_path=`$CYGPATH -u "$windows_path"`
28795     new_path="$unix_path"
28796   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28797     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28798     new_path="$unix_path"
28799   fi
28800 
28801   if test "x$path" != "x$new_path"; then
28802     BOOT_JDK="$new_path"
28803     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28804 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28805   fi
28806 
28807   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28808   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28809 
28810     else
28811       # We're on a unix platform. Hooray! :)
28812       path="$BOOT_JDK"
28813       has_space=`$ECHO "$path" | $GREP " "`
28814       if test "x$has_space" != x; then
28815         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28816 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28817         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28818       fi
28819 
28820       # Use eval to expand a potential ~
28821       eval path="$path"
28822       if test ! -f "$path" && test ! -d "$path"; then
28823         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28824       fi
28825 
28826       if test -d "$path"; then
28827         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28828       else
28829         dir="`$DIRNAME "$path"`"
28830         base="`$BASENAME "$path"`"
28831         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28832       fi
28833     fi
28834   fi
28835 
28836             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28837 $as_echo_n "checking for Boot JDK... " >&6; }
28838             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28839 $as_echo "$BOOT_JDK" >&6; }
28840             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28841 $as_echo_n "checking Boot JDK version... " >&6; }
28842             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28843             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28844 $as_echo "$BOOT_JDK_VERSION" >&6; }
28845           fi # end check jdk version
28846         fi # end check javac
28847       fi # end check java
28848     fi # end check boot jdk found
28849   fi
28850 
28851     done
28852   fi
28853 
28854 
28855     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28856     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28857       # Do we have a bin/java?
28858       if test ! -x "$BOOT_JDK/bin/java"; then
28859         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28860 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28861         BOOT_JDK_FOUND=no
28862       else
28863         # Do we have a bin/javac?
28864         if test ! -x "$BOOT_JDK/bin/javac"; then
28865           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28866 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28867           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28868 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28869           BOOT_JDK_FOUND=no
28870         else
28871           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28872           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28873 
28874           # Extra M4 quote needed to protect [] in grep expression.
28875           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28876           if test "x$FOUND_CORRECT_VERSION" = x; then
28877             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28878 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28879             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28880 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28881             BOOT_JDK_FOUND=no
28882           else
28883             # We're done! :-)
28884             BOOT_JDK_FOUND=yes
28885 
28886   # Only process if variable expands to non-empty
28887 
28888   if test "x$BOOT_JDK" != x; then
28889     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28890 
28891   # Input might be given as Windows format, start by converting to
28892   # unix format.
28893   path="$BOOT_JDK"
28894   new_path=`$CYGPATH -u "$path"`
28895 
28896   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28897   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28898   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28899   # "foo.exe" is OK but "foo" is an error.
28900   #
28901   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28902   # It is also a way to make sure we got the proper file name for the real test later on.
28903   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28904   if test "x$test_shortpath" = x; then
28905     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28906 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28907     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28908   fi
28909 
28910   # Call helper function which possibly converts this using DOS-style short mode.
28911   # If so, the updated path is stored in $new_path.
28912 
28913   input_path="$new_path"
28914   # Check if we need to convert this using DOS-style short mode. If the path
28915   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28916   # take no chances and rewrite it.
28917   # Note: m4 eats our [], so we need to use [ and ] instead.
28918   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28919   if test "x$has_forbidden_chars" != x; then
28920     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28921     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28922     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28923     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28924       # Going to short mode and back again did indeed matter. Since short mode is
28925       # case insensitive, let's make it lowercase to improve readability.
28926       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28927       # Now convert it back to Unix-style (cygpath)
28928       input_path=`$CYGPATH -u "$shortmode_path"`
28929       new_path="$input_path"
28930     fi
28931   fi
28932 
28933   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28934   if test "x$test_cygdrive_prefix" = x; then
28935     # As a simple fix, exclude /usr/bin since it's not a real path.
28936     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28937       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28938       # a path prefixed by /cygdrive for fixpath to work.
28939       new_path="$CYGWIN_ROOT_PATH$input_path"
28940     fi
28941   fi
28942 
28943 
28944   if test "x$path" != "x$new_path"; then
28945     BOOT_JDK="$new_path"
28946     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28947 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28948   fi
28949 
28950     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28951 
28952   path="$BOOT_JDK"
28953   has_colon=`$ECHO $path | $GREP ^.:`
28954   new_path="$path"
28955   if test "x$has_colon" = x; then
28956     # Not in mixed or Windows style, start by that.
28957     new_path=`cmd //c echo $path`
28958   fi
28959 
28960 
28961   input_path="$new_path"
28962   # Check if we need to convert this using DOS-style short mode. If the path
28963   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28964   # take no chances and rewrite it.
28965   # Note: m4 eats our [], so we need to use [ and ] instead.
28966   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28967   if test "x$has_forbidden_chars" != x; then
28968     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28969     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28970   fi
28971 
28972 
28973   windows_path="$new_path"
28974   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28975     unix_path=`$CYGPATH -u "$windows_path"`
28976     new_path="$unix_path"
28977   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28978     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28979     new_path="$unix_path"
28980   fi
28981 
28982   if test "x$path" != "x$new_path"; then
28983     BOOT_JDK="$new_path"
28984     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28985 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28986   fi
28987 
28988   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28989   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28990 
28991     else
28992       # We're on a unix platform. Hooray! :)
28993       path="$BOOT_JDK"
28994       has_space=`$ECHO "$path" | $GREP " "`
28995       if test "x$has_space" != x; then
28996         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28997 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28998         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28999       fi
29000 
29001       # Use eval to expand a potential ~
29002       eval path="$path"
29003       if test ! -f "$path" && test ! -d "$path"; then
29004         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29005       fi
29006 
29007       if test -d "$path"; then
29008         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29009       else
29010         dir="`$DIRNAME "$path"`"
29011         base="`$BASENAME "$path"`"
29012         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29013       fi
29014     fi
29015   fi
29016 
29017             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29018 $as_echo_n "checking for Boot JDK... " >&6; }
29019             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29020 $as_echo "$BOOT_JDK" >&6; }
29021             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29022 $as_echo_n "checking Boot JDK version... " >&6; }
29023             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29024             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29025 $as_echo "$BOOT_JDK_VERSION" >&6; }
29026           fi # end check jdk version
29027         fi # end check javac
29028       fi # end check java
29029     fi # end check boot jdk found
29030   fi
29031 
29032   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
29033 
29034   if test "x$BOOT_JDK_FOUND" = xno; then
29035     # Now execute the test
29036 
29037   BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
29038   BOOT_JDK_SUFFIX="/Contents/Home"
29039   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29040   if test "x$ALL_JDKS_FOUND" != x; then
29041     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29042 
29043   if test "x$BOOT_JDK_FOUND" = xno; then
29044     # Now execute the test
29045 
29046         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29047         if test -d "$BOOT_JDK"; then
29048           BOOT_JDK_FOUND=maybe
29049           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29050 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29051         fi
29052 
29053 
29054     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29055     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29056       # Do we have a bin/java?
29057       if test ! -x "$BOOT_JDK/bin/java"; then
29058         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29059 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29060         BOOT_JDK_FOUND=no
29061       else
29062         # Do we have a bin/javac?
29063         if test ! -x "$BOOT_JDK/bin/javac"; then
29064           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29065 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29066           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29067 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29068           BOOT_JDK_FOUND=no
29069         else
29070           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29071           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29072 
29073           # Extra M4 quote needed to protect [] in grep expression.
29074           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29075           if test "x$FOUND_CORRECT_VERSION" = x; then
29076             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29077 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29078             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29079 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29080             BOOT_JDK_FOUND=no
29081           else
29082             # We're done! :-)
29083             BOOT_JDK_FOUND=yes
29084 
29085   # Only process if variable expands to non-empty
29086 
29087   if test "x$BOOT_JDK" != x; then
29088     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29089 
29090   # Input might be given as Windows format, start by converting to
29091   # unix format.
29092   path="$BOOT_JDK"
29093   new_path=`$CYGPATH -u "$path"`
29094 
29095   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29096   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29097   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29098   # "foo.exe" is OK but "foo" is an error.
29099   #
29100   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29101   # It is also a way to make sure we got the proper file name for the real test later on.
29102   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29103   if test "x$test_shortpath" = x; then
29104     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29105 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29106     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29107   fi
29108 
29109   # Call helper function which possibly converts this using DOS-style short mode.
29110   # If so, the updated path is stored in $new_path.
29111 
29112   input_path="$new_path"
29113   # Check if we need to convert this using DOS-style short mode. If the path
29114   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29115   # take no chances and rewrite it.
29116   # Note: m4 eats our [], so we need to use [ and ] instead.
29117   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29118   if test "x$has_forbidden_chars" != x; then
29119     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29120     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29121     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29122     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29123       # Going to short mode and back again did indeed matter. Since short mode is
29124       # case insensitive, let's make it lowercase to improve readability.
29125       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29126       # Now convert it back to Unix-style (cygpath)
29127       input_path=`$CYGPATH -u "$shortmode_path"`
29128       new_path="$input_path"
29129     fi
29130   fi
29131 
29132   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29133   if test "x$test_cygdrive_prefix" = x; then
29134     # As a simple fix, exclude /usr/bin since it's not a real path.
29135     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29136       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29137       # a path prefixed by /cygdrive for fixpath to work.
29138       new_path="$CYGWIN_ROOT_PATH$input_path"
29139     fi
29140   fi
29141 
29142 
29143   if test "x$path" != "x$new_path"; then
29144     BOOT_JDK="$new_path"
29145     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29146 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29147   fi
29148 
29149     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29150 
29151   path="$BOOT_JDK"
29152   has_colon=`$ECHO $path | $GREP ^.:`
29153   new_path="$path"
29154   if test "x$has_colon" = x; then
29155     # Not in mixed or Windows style, start by that.
29156     new_path=`cmd //c echo $path`
29157   fi
29158 
29159 
29160   input_path="$new_path"
29161   # Check if we need to convert this using DOS-style short mode. If the path
29162   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29163   # take no chances and rewrite it.
29164   # Note: m4 eats our [], so we need to use [ and ] instead.
29165   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29166   if test "x$has_forbidden_chars" != x; then
29167     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29168     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29169   fi
29170 
29171 
29172   windows_path="$new_path"
29173   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29174     unix_path=`$CYGPATH -u "$windows_path"`
29175     new_path="$unix_path"
29176   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29177     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29178     new_path="$unix_path"
29179   fi
29180 
29181   if test "x$path" != "x$new_path"; then
29182     BOOT_JDK="$new_path"
29183     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29184 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29185   fi
29186 
29187   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29188   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29189 
29190     else
29191       # We're on a unix platform. Hooray! :)
29192       path="$BOOT_JDK"
29193       has_space=`$ECHO "$path" | $GREP " "`
29194       if test "x$has_space" != x; then
29195         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29196 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29197         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29198       fi
29199 
29200       # Use eval to expand a potential ~
29201       eval path="$path"
29202       if test ! -f "$path" && test ! -d "$path"; then
29203         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29204       fi
29205 
29206       if test -d "$path"; then
29207         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29208       else
29209         dir="`$DIRNAME "$path"`"
29210         base="`$BASENAME "$path"`"
29211         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29212       fi
29213     fi
29214   fi
29215 
29216             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29217 $as_echo_n "checking for Boot JDK... " >&6; }
29218             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29219 $as_echo "$BOOT_JDK" >&6; }
29220             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29221 $as_echo_n "checking Boot JDK version... " >&6; }
29222             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29223             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29224 $as_echo "$BOOT_JDK_VERSION" >&6; }
29225           fi # end check jdk version
29226         fi # end check javac
29227       fi # end check java
29228     fi # end check boot jdk found
29229   fi
29230 
29231     done
29232   fi
29233 
29234 
29235     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29236     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29237       # Do we have a bin/java?
29238       if test ! -x "$BOOT_JDK/bin/java"; then
29239         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29240 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29241         BOOT_JDK_FOUND=no
29242       else
29243         # Do we have a bin/javac?
29244         if test ! -x "$BOOT_JDK/bin/javac"; then
29245           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29246 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29247           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29248 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29249           BOOT_JDK_FOUND=no
29250         else
29251           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29252           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29253 
29254           # Extra M4 quote needed to protect [] in grep expression.
29255           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29256           if test "x$FOUND_CORRECT_VERSION" = x; then
29257             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29258 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29259             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29260 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29261             BOOT_JDK_FOUND=no
29262           else
29263             # We're done! :-)
29264             BOOT_JDK_FOUND=yes
29265 
29266   # Only process if variable expands to non-empty
29267 
29268   if test "x$BOOT_JDK" != x; then
29269     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29270 
29271   # Input might be given as Windows format, start by converting to
29272   # unix format.
29273   path="$BOOT_JDK"
29274   new_path=`$CYGPATH -u "$path"`
29275 
29276   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29277   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29278   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29279   # "foo.exe" is OK but "foo" is an error.
29280   #
29281   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29282   # It is also a way to make sure we got the proper file name for the real test later on.
29283   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29284   if test "x$test_shortpath" = x; then
29285     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29286 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29287     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29288   fi
29289 
29290   # Call helper function which possibly converts this using DOS-style short mode.
29291   # If so, the updated path is stored in $new_path.
29292 
29293   input_path="$new_path"
29294   # Check if we need to convert this using DOS-style short mode. If the path
29295   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29296   # take no chances and rewrite it.
29297   # Note: m4 eats our [], so we need to use [ and ] instead.
29298   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29299   if test "x$has_forbidden_chars" != x; then
29300     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29301     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29302     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29303     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29304       # Going to short mode and back again did indeed matter. Since short mode is
29305       # case insensitive, let's make it lowercase to improve readability.
29306       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29307       # Now convert it back to Unix-style (cygpath)
29308       input_path=`$CYGPATH -u "$shortmode_path"`
29309       new_path="$input_path"
29310     fi
29311   fi
29312 
29313   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29314   if test "x$test_cygdrive_prefix" = x; then
29315     # As a simple fix, exclude /usr/bin since it's not a real path.
29316     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29317       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29318       # a path prefixed by /cygdrive for fixpath to work.
29319       new_path="$CYGWIN_ROOT_PATH$input_path"
29320     fi
29321   fi
29322 
29323 
29324   if test "x$path" != "x$new_path"; then
29325     BOOT_JDK="$new_path"
29326     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29327 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29328   fi
29329 
29330     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29331 
29332   path="$BOOT_JDK"
29333   has_colon=`$ECHO $path | $GREP ^.:`
29334   new_path="$path"
29335   if test "x$has_colon" = x; then
29336     # Not in mixed or Windows style, start by that.
29337     new_path=`cmd //c echo $path`
29338   fi
29339 
29340 
29341   input_path="$new_path"
29342   # Check if we need to convert this using DOS-style short mode. If the path
29343   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29344   # take no chances and rewrite it.
29345   # Note: m4 eats our [], so we need to use [ and ] instead.
29346   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29347   if test "x$has_forbidden_chars" != x; then
29348     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29349     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29350   fi
29351 
29352 
29353   windows_path="$new_path"
29354   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29355     unix_path=`$CYGPATH -u "$windows_path"`
29356     new_path="$unix_path"
29357   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29358     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29359     new_path="$unix_path"
29360   fi
29361 
29362   if test "x$path" != "x$new_path"; then
29363     BOOT_JDK="$new_path"
29364     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29365 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29366   fi
29367 
29368   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29369   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29370 
29371     else
29372       # We're on a unix platform. Hooray! :)
29373       path="$BOOT_JDK"
29374       has_space=`$ECHO "$path" | $GREP " "`
29375       if test "x$has_space" != x; then
29376         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29377 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29378         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29379       fi
29380 
29381       # Use eval to expand a potential ~
29382       eval path="$path"
29383       if test ! -f "$path" && test ! -d "$path"; then
29384         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29385       fi
29386 
29387       if test -d "$path"; then
29388         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29389       else
29390         dir="`$DIRNAME "$path"`"
29391         base="`$BASENAME "$path"`"
29392         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29393       fi
29394     fi
29395   fi
29396 
29397             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29398 $as_echo_n "checking for Boot JDK... " >&6; }
29399             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29400 $as_echo "$BOOT_JDK" >&6; }
29401             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29402 $as_echo_n "checking Boot JDK version... " >&6; }
29403             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29404             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29405 $as_echo "$BOOT_JDK_VERSION" >&6; }
29406           fi # end check jdk version
29407         fi # end check javac
29408       fi # end check java
29409     fi # end check boot jdk found
29410   fi
29411 
29412 
29413   if test "x$BOOT_JDK_FOUND" = xno; then
29414     # Now execute the test
29415 
29416   BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
29417   BOOT_JDK_SUFFIX="/Contents/Home"
29418   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29419   if test "x$ALL_JDKS_FOUND" != x; then
29420     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29421 
29422   if test "x$BOOT_JDK_FOUND" = xno; then
29423     # Now execute the test
29424 
29425         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29426         if test -d "$BOOT_JDK"; then
29427           BOOT_JDK_FOUND=maybe
29428           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29429 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29430         fi
29431 
29432 
29433     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29434     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29435       # Do we have a bin/java?
29436       if test ! -x "$BOOT_JDK/bin/java"; then
29437         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29438 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29439         BOOT_JDK_FOUND=no
29440       else
29441         # Do we have a bin/javac?
29442         if test ! -x "$BOOT_JDK/bin/javac"; then
29443           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29444 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29445           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29446 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29447           BOOT_JDK_FOUND=no
29448         else
29449           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29450           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29451 
29452           # Extra M4 quote needed to protect [] in grep expression.
29453           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29454           if test "x$FOUND_CORRECT_VERSION" = x; then
29455             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29456 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29457             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29458 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29459             BOOT_JDK_FOUND=no
29460           else
29461             # We're done! :-)
29462             BOOT_JDK_FOUND=yes
29463 
29464   # Only process if variable expands to non-empty
29465 
29466   if test "x$BOOT_JDK" != x; then
29467     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29468 
29469   # Input might be given as Windows format, start by converting to
29470   # unix format.
29471   path="$BOOT_JDK"
29472   new_path=`$CYGPATH -u "$path"`
29473 
29474   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29475   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29476   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29477   # "foo.exe" is OK but "foo" is an error.
29478   #
29479   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29480   # It is also a way to make sure we got the proper file name for the real test later on.
29481   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29482   if test "x$test_shortpath" = x; then
29483     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29484 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29485     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29486   fi
29487 
29488   # Call helper function which possibly converts this using DOS-style short mode.
29489   # If so, the updated path is stored in $new_path.
29490 
29491   input_path="$new_path"
29492   # Check if we need to convert this using DOS-style short mode. If the path
29493   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29494   # take no chances and rewrite it.
29495   # Note: m4 eats our [], so we need to use [ and ] instead.
29496   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29497   if test "x$has_forbidden_chars" != x; then
29498     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29499     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29500     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29501     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29502       # Going to short mode and back again did indeed matter. Since short mode is
29503       # case insensitive, let's make it lowercase to improve readability.
29504       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29505       # Now convert it back to Unix-style (cygpath)
29506       input_path=`$CYGPATH -u "$shortmode_path"`
29507       new_path="$input_path"
29508     fi
29509   fi
29510 
29511   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29512   if test "x$test_cygdrive_prefix" = x; then
29513     # As a simple fix, exclude /usr/bin since it's not a real path.
29514     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29515       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29516       # a path prefixed by /cygdrive for fixpath to work.
29517       new_path="$CYGWIN_ROOT_PATH$input_path"
29518     fi
29519   fi
29520 
29521 
29522   if test "x$path" != "x$new_path"; then
29523     BOOT_JDK="$new_path"
29524     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29525 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29526   fi
29527 
29528     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29529 
29530   path="$BOOT_JDK"
29531   has_colon=`$ECHO $path | $GREP ^.:`
29532   new_path="$path"
29533   if test "x$has_colon" = x; then
29534     # Not in mixed or Windows style, start by that.
29535     new_path=`cmd //c echo $path`
29536   fi
29537 
29538 
29539   input_path="$new_path"
29540   # Check if we need to convert this using DOS-style short mode. If the path
29541   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29542   # take no chances and rewrite it.
29543   # Note: m4 eats our [], so we need to use [ and ] instead.
29544   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29545   if test "x$has_forbidden_chars" != x; then
29546     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29547     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29548   fi
29549 
29550 
29551   windows_path="$new_path"
29552   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29553     unix_path=`$CYGPATH -u "$windows_path"`
29554     new_path="$unix_path"
29555   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29556     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29557     new_path="$unix_path"
29558   fi
29559 
29560   if test "x$path" != "x$new_path"; then
29561     BOOT_JDK="$new_path"
29562     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29563 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29564   fi
29565 
29566   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29567   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29568 
29569     else
29570       # We're on a unix platform. Hooray! :)
29571       path="$BOOT_JDK"
29572       has_space=`$ECHO "$path" | $GREP " "`
29573       if test "x$has_space" != x; then
29574         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29575 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29576         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29577       fi
29578 
29579       # Use eval to expand a potential ~
29580       eval path="$path"
29581       if test ! -f "$path" && test ! -d "$path"; then
29582         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29583       fi
29584 
29585       if test -d "$path"; then
29586         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29587       else
29588         dir="`$DIRNAME "$path"`"
29589         base="`$BASENAME "$path"`"
29590         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29591       fi
29592     fi
29593   fi
29594 
29595             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29596 $as_echo_n "checking for Boot JDK... " >&6; }
29597             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29598 $as_echo "$BOOT_JDK" >&6; }
29599             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29600 $as_echo_n "checking Boot JDK version... " >&6; }
29601             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29602             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29603 $as_echo "$BOOT_JDK_VERSION" >&6; }
29604           fi # end check jdk version
29605         fi # end check javac
29606       fi # end check java
29607     fi # end check boot jdk found
29608   fi
29609 
29610     done
29611   fi
29612 
29613 
29614     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29615     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29616       # Do we have a bin/java?
29617       if test ! -x "$BOOT_JDK/bin/java"; then
29618         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29619 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29620         BOOT_JDK_FOUND=no
29621       else
29622         # Do we have a bin/javac?
29623         if test ! -x "$BOOT_JDK/bin/javac"; then
29624           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29625 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29626           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29627 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29628           BOOT_JDK_FOUND=no
29629         else
29630           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29631           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29632 
29633           # Extra M4 quote needed to protect [] in grep expression.
29634           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29635           if test "x$FOUND_CORRECT_VERSION" = x; then
29636             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29637 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29638             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29639 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29640             BOOT_JDK_FOUND=no
29641           else
29642             # We're done! :-)
29643             BOOT_JDK_FOUND=yes
29644 
29645   # Only process if variable expands to non-empty
29646 
29647   if test "x$BOOT_JDK" != x; then
29648     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29649 
29650   # Input might be given as Windows format, start by converting to
29651   # unix format.
29652   path="$BOOT_JDK"
29653   new_path=`$CYGPATH -u "$path"`
29654 
29655   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29656   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29657   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29658   # "foo.exe" is OK but "foo" is an error.
29659   #
29660   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29661   # It is also a way to make sure we got the proper file name for the real test later on.
29662   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29663   if test "x$test_shortpath" = x; then
29664     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29665 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29666     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29667   fi
29668 
29669   # Call helper function which possibly converts this using DOS-style short mode.
29670   # If so, the updated path is stored in $new_path.
29671 
29672   input_path="$new_path"
29673   # Check if we need to convert this using DOS-style short mode. If the path
29674   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29675   # take no chances and rewrite it.
29676   # Note: m4 eats our [], so we need to use [ and ] instead.
29677   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29678   if test "x$has_forbidden_chars" != x; then
29679     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29680     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29681     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29682     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29683       # Going to short mode and back again did indeed matter. Since short mode is
29684       # case insensitive, let's make it lowercase to improve readability.
29685       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29686       # Now convert it back to Unix-style (cygpath)
29687       input_path=`$CYGPATH -u "$shortmode_path"`
29688       new_path="$input_path"
29689     fi
29690   fi
29691 
29692   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29693   if test "x$test_cygdrive_prefix" = x; then
29694     # As a simple fix, exclude /usr/bin since it's not a real path.
29695     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29696       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29697       # a path prefixed by /cygdrive for fixpath to work.
29698       new_path="$CYGWIN_ROOT_PATH$input_path"
29699     fi
29700   fi
29701 
29702 
29703   if test "x$path" != "x$new_path"; then
29704     BOOT_JDK="$new_path"
29705     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29706 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29707   fi
29708 
29709     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29710 
29711   path="$BOOT_JDK"
29712   has_colon=`$ECHO $path | $GREP ^.:`
29713   new_path="$path"
29714   if test "x$has_colon" = x; then
29715     # Not in mixed or Windows style, start by that.
29716     new_path=`cmd //c echo $path`
29717   fi
29718 
29719 
29720   input_path="$new_path"
29721   # Check if we need to convert this using DOS-style short mode. If the path
29722   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29723   # take no chances and rewrite it.
29724   # Note: m4 eats our [], so we need to use [ and ] instead.
29725   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29726   if test "x$has_forbidden_chars" != x; then
29727     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29728     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29729   fi
29730 
29731 
29732   windows_path="$new_path"
29733   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29734     unix_path=`$CYGPATH -u "$windows_path"`
29735     new_path="$unix_path"
29736   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29737     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29738     new_path="$unix_path"
29739   fi
29740 
29741   if test "x$path" != "x$new_path"; then
29742     BOOT_JDK="$new_path"
29743     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29744 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29745   fi
29746 
29747   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29748   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29749 
29750     else
29751       # We're on a unix platform. Hooray! :)
29752       path="$BOOT_JDK"
29753       has_space=`$ECHO "$path" | $GREP " "`
29754       if test "x$has_space" != x; then
29755         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29756 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29757         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29758       fi
29759 
29760       # Use eval to expand a potential ~
29761       eval path="$path"
29762       if test ! -f "$path" && test ! -d "$path"; then
29763         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29764       fi
29765 
29766       if test -d "$path"; then
29767         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29768       else
29769         dir="`$DIRNAME "$path"`"
29770         base="`$BASENAME "$path"`"
29771         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29772       fi
29773     fi
29774   fi
29775 
29776             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29777 $as_echo_n "checking for Boot JDK... " >&6; }
29778             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29779 $as_echo "$BOOT_JDK" >&6; }
29780             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29781 $as_echo_n "checking Boot JDK version... " >&6; }
29782             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29783             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29784 $as_echo "$BOOT_JDK_VERSION" >&6; }
29785           fi # end check jdk version
29786         fi # end check javac
29787       fi # end check java
29788     fi # end check boot jdk found
29789   fi
29790 
29791   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
29792 
29793   if test "x$BOOT_JDK_FOUND" = xno; then
29794     # Now execute the test
29795 
29796   BOOT_JDK_PREFIX="/usr/lib/jvm"
29797   BOOT_JDK_SUFFIX=""
29798   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29799   if test "x$ALL_JDKS_FOUND" != x; then
29800     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29801 
29802   if test "x$BOOT_JDK_FOUND" = xno; then
29803     # Now execute the test
29804 
29805         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29806         if test -d "$BOOT_JDK"; then
29807           BOOT_JDK_FOUND=maybe
29808           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29809 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29810         fi
29811 
29812 
29813     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29814     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29815       # Do we have a bin/java?
29816       if test ! -x "$BOOT_JDK/bin/java"; then
29817         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29818 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29819         BOOT_JDK_FOUND=no
29820       else
29821         # Do we have a bin/javac?
29822         if test ! -x "$BOOT_JDK/bin/javac"; then
29823           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29824 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29825           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29826 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29827           BOOT_JDK_FOUND=no
29828         else
29829           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29830           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29831 
29832           # Extra M4 quote needed to protect [] in grep expression.
29833           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29834           if test "x$FOUND_CORRECT_VERSION" = x; then
29835             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29836 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29837             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29838 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29839             BOOT_JDK_FOUND=no
29840           else
29841             # We're done! :-)
29842             BOOT_JDK_FOUND=yes
29843 
29844   # Only process if variable expands to non-empty
29845 
29846   if test "x$BOOT_JDK" != x; then
29847     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29848 
29849   # Input might be given as Windows format, start by converting to
29850   # unix format.
29851   path="$BOOT_JDK"
29852   new_path=`$CYGPATH -u "$path"`
29853 
29854   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29855   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29856   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29857   # "foo.exe" is OK but "foo" is an error.
29858   #
29859   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29860   # It is also a way to make sure we got the proper file name for the real test later on.
29861   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29862   if test "x$test_shortpath" = x; then
29863     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29864 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29865     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29866   fi
29867 
29868   # Call helper function which possibly converts this using DOS-style short mode.
29869   # If so, the updated path is stored in $new_path.
29870 
29871   input_path="$new_path"
29872   # Check if we need to convert this using DOS-style short mode. If the path
29873   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29874   # take no chances and rewrite it.
29875   # Note: m4 eats our [], so we need to use [ and ] instead.
29876   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29877   if test "x$has_forbidden_chars" != x; then
29878     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29879     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29880     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29881     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29882       # Going to short mode and back again did indeed matter. Since short mode is
29883       # case insensitive, let's make it lowercase to improve readability.
29884       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29885       # Now convert it back to Unix-style (cygpath)
29886       input_path=`$CYGPATH -u "$shortmode_path"`
29887       new_path="$input_path"
29888     fi
29889   fi
29890 
29891   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29892   if test "x$test_cygdrive_prefix" = x; then
29893     # As a simple fix, exclude /usr/bin since it's not a real path.
29894     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29895       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29896       # a path prefixed by /cygdrive for fixpath to work.
29897       new_path="$CYGWIN_ROOT_PATH$input_path"
29898     fi
29899   fi
29900 
29901 
29902   if test "x$path" != "x$new_path"; then
29903     BOOT_JDK="$new_path"
29904     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29905 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29906   fi
29907 
29908     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29909 
29910   path="$BOOT_JDK"
29911   has_colon=`$ECHO $path | $GREP ^.:`
29912   new_path="$path"
29913   if test "x$has_colon" = x; then
29914     # Not in mixed or Windows style, start by that.
29915     new_path=`cmd //c echo $path`
29916   fi
29917 
29918 
29919   input_path="$new_path"
29920   # Check if we need to convert this using DOS-style short mode. If the path
29921   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29922   # take no chances and rewrite it.
29923   # Note: m4 eats our [], so we need to use [ and ] instead.
29924   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29925   if test "x$has_forbidden_chars" != x; then
29926     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29927     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29928   fi
29929 
29930 
29931   windows_path="$new_path"
29932   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29933     unix_path=`$CYGPATH -u "$windows_path"`
29934     new_path="$unix_path"
29935   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29936     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29937     new_path="$unix_path"
29938   fi
29939 
29940   if test "x$path" != "x$new_path"; then
29941     BOOT_JDK="$new_path"
29942     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29943 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29944   fi
29945 
29946   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29947   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29948 
29949     else
29950       # We're on a unix platform. Hooray! :)
29951       path="$BOOT_JDK"
29952       has_space=`$ECHO "$path" | $GREP " "`
29953       if test "x$has_space" != x; then
29954         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29955 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29956         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29957       fi
29958 
29959       # Use eval to expand a potential ~
29960       eval path="$path"
29961       if test ! -f "$path" && test ! -d "$path"; then
29962         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29963       fi
29964 
29965       if test -d "$path"; then
29966         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29967       else
29968         dir="`$DIRNAME "$path"`"
29969         base="`$BASENAME "$path"`"
29970         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29971       fi
29972     fi
29973   fi
29974 
29975             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29976 $as_echo_n "checking for Boot JDK... " >&6; }
29977             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29978 $as_echo "$BOOT_JDK" >&6; }
29979             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29980 $as_echo_n "checking Boot JDK version... " >&6; }
29981             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29982             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29983 $as_echo "$BOOT_JDK_VERSION" >&6; }
29984           fi # end check jdk version
29985         fi # end check javac
29986       fi # end check java
29987     fi # end check boot jdk found
29988   fi
29989 
29990     done
29991   fi
29992 
29993 
29994     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29995     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29996       # Do we have a bin/java?
29997       if test ! -x "$BOOT_JDK/bin/java"; then
29998         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29999 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30000         BOOT_JDK_FOUND=no
30001       else
30002         # Do we have a bin/javac?
30003         if test ! -x "$BOOT_JDK/bin/javac"; then
30004           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30005 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30006           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30007 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30008           BOOT_JDK_FOUND=no
30009         else
30010           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30011           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30012 
30013           # Extra M4 quote needed to protect [] in grep expression.
30014           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
30015           if test "x$FOUND_CORRECT_VERSION" = x; then
30016             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30017 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30018             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
30019 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
30020             BOOT_JDK_FOUND=no
30021           else
30022             # We're done! :-)
30023             BOOT_JDK_FOUND=yes
30024 
30025   # Only process if variable expands to non-empty
30026 
30027   if test "x$BOOT_JDK" != x; then
30028     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30029 
30030   # Input might be given as Windows format, start by converting to
30031   # unix format.
30032   path="$BOOT_JDK"
30033   new_path=`$CYGPATH -u "$path"`
30034 
30035   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30036   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30037   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30038   # "foo.exe" is OK but "foo" is an error.
30039   #
30040   # This test is therefore slightly more accurate than "test -f" to check for file precense.
30041   # It is also a way to make sure we got the proper file name for the real test later on.
30042   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30043   if test "x$test_shortpath" = x; then
30044     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30045 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30046     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30047   fi
30048 
30049   # Call helper function which possibly converts this using DOS-style short mode.
30050   # If so, the updated path is stored in $new_path.
30051 
30052   input_path="$new_path"
30053   # Check if we need to convert this using DOS-style short mode. If the path
30054   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30055   # take no chances and rewrite it.
30056   # Note: m4 eats our [], so we need to use [ and ] instead.
30057   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30058   if test "x$has_forbidden_chars" != x; then
30059     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30060     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30061     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30062     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30063       # Going to short mode and back again did indeed matter. Since short mode is
30064       # case insensitive, let's make it lowercase to improve readability.
30065       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30066       # Now convert it back to Unix-style (cygpath)
30067       input_path=`$CYGPATH -u "$shortmode_path"`
30068       new_path="$input_path"
30069     fi
30070   fi
30071 
30072   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30073   if test "x$test_cygdrive_prefix" = x; then
30074     # As a simple fix, exclude /usr/bin since it's not a real path.
30075     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30076       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30077       # a path prefixed by /cygdrive for fixpath to work.
30078       new_path="$CYGWIN_ROOT_PATH$input_path"
30079     fi
30080   fi
30081 
30082 
30083   if test "x$path" != "x$new_path"; then
30084     BOOT_JDK="$new_path"
30085     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30086 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30087   fi
30088 
30089     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30090 
30091   path="$BOOT_JDK"
30092   has_colon=`$ECHO $path | $GREP ^.:`
30093   new_path="$path"
30094   if test "x$has_colon" = x; then
30095     # Not in mixed or Windows style, start by that.
30096     new_path=`cmd //c echo $path`
30097   fi
30098 
30099 
30100   input_path="$new_path"
30101   # Check if we need to convert this using DOS-style short mode. If the path
30102   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30103   # take no chances and rewrite it.
30104   # Note: m4 eats our [], so we need to use [ and ] instead.
30105   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30106   if test "x$has_forbidden_chars" != x; then
30107     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30108     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30109   fi
30110 
30111 
30112   windows_path="$new_path"
30113   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30114     unix_path=`$CYGPATH -u "$windows_path"`
30115     new_path="$unix_path"
30116   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30117     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30118     new_path="$unix_path"
30119   fi
30120 
30121   if test "x$path" != "x$new_path"; then
30122     BOOT_JDK="$new_path"
30123     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30124 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30125   fi
30126 
30127   # Save the first 10 bytes of this path to the storage, so fixpath can work.
30128   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30129 
30130     else
30131       # We're on a unix platform. Hooray! :)
30132       path="$BOOT_JDK"
30133       has_space=`$ECHO "$path" | $GREP " "`
30134       if test "x$has_space" != x; then
30135         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30136 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30137         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30138       fi
30139 
30140       # Use eval to expand a potential ~
30141       eval path="$path"
30142       if test ! -f "$path" && test ! -d "$path"; then
30143         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30144       fi
30145 
30146       if test -d "$path"; then
30147         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30148       else
30149         dir="`$DIRNAME "$path"`"
30150         base="`$BASENAME "$path"`"
30151         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30152       fi
30153     fi
30154   fi
30155 
30156             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30157 $as_echo_n "checking for Boot JDK... " >&6; }
30158             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30159 $as_echo "$BOOT_JDK" >&6; }
30160             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30161 $as_echo_n "checking Boot JDK version... " >&6; }
30162             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30163             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30164 $as_echo "$BOOT_JDK_VERSION" >&6; }
30165           fi # end check jdk version
30166         fi # end check javac
30167       fi # end check java
30168     fi # end check boot jdk found
30169   fi
30170 
30171   fi
30172 
30173 
30174     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30175     if test "x$BOOT_JDK_FOUND" = xmaybe; then
30176       # Do we have a bin/java?
30177       if test ! -x "$BOOT_JDK/bin/java"; then
30178         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30179 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30180         BOOT_JDK_FOUND=no
30181       else
30182         # Do we have a bin/javac?
30183         if test ! -x "$BOOT_JDK/bin/javac"; then
30184           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30185 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30186           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30187 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30188           BOOT_JDK_FOUND=no
30189         else
30190           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30191           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30192 
30193           # Extra M4 quote needed to protect [] in grep expression.
30194           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
30195           if test "x$FOUND_CORRECT_VERSION" = x; then
30196             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30197 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30198             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
30199 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
30200             BOOT_JDK_FOUND=no
30201           else
30202             # We're done! :-)
30203             BOOT_JDK_FOUND=yes
30204 
30205   # Only process if variable expands to non-empty
30206 
30207   if test "x$BOOT_JDK" != x; then
30208     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30209 
30210   # Input might be given as Windows format, start by converting to
30211   # unix format.
30212   path="$BOOT_JDK"
30213   new_path=`$CYGPATH -u "$path"`
30214 
30215   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30216   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30217   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30218   # "foo.exe" is OK but "foo" is an error.
30219   #
30220   # This test is therefore slightly more accurate than "test -f" to check for file precense.
30221   # It is also a way to make sure we got the proper file name for the real test later on.
30222   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30223   if test "x$test_shortpath" = x; then
30224     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30225 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30226     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30227   fi
30228 
30229   # Call helper function which possibly converts this using DOS-style short mode.
30230   # If so, the updated path is stored in $new_path.
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     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30241     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30242     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30243       # Going to short mode and back again did indeed matter. Since short mode is
30244       # case insensitive, let's make it lowercase to improve readability.
30245       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30246       # Now convert it back to Unix-style (cygpath)
30247       input_path=`$CYGPATH -u "$shortmode_path"`
30248       new_path="$input_path"
30249     fi
30250   fi
30251 
30252   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30253   if test "x$test_cygdrive_prefix" = x; then
30254     # As a simple fix, exclude /usr/bin since it's not a real path.
30255     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30256       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30257       # a path prefixed by /cygdrive for fixpath to work.
30258       new_path="$CYGWIN_ROOT_PATH$input_path"
30259     fi
30260   fi
30261 
30262 
30263   if test "x$path" != "x$new_path"; then
30264     BOOT_JDK="$new_path"
30265     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30266 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30267   fi
30268 
30269     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30270 
30271   path="$BOOT_JDK"
30272   has_colon=`$ECHO $path | $GREP ^.:`
30273   new_path="$path"
30274   if test "x$has_colon" = x; then
30275     # Not in mixed or Windows style, start by that.
30276     new_path=`cmd //c echo $path`
30277   fi
30278 
30279 
30280   input_path="$new_path"
30281   # Check if we need to convert this using DOS-style short mode. If the path
30282   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30283   # take no chances and rewrite it.
30284   # Note: m4 eats our [], so we need to use [ and ] instead.
30285   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30286   if test "x$has_forbidden_chars" != x; then
30287     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30288     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30289   fi
30290 
30291 
30292   windows_path="$new_path"
30293   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30294     unix_path=`$CYGPATH -u "$windows_path"`
30295     new_path="$unix_path"
30296   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30297     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30298     new_path="$unix_path"
30299   fi
30300 
30301   if test "x$path" != "x$new_path"; then
30302     BOOT_JDK="$new_path"
30303     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30304 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30305   fi
30306 
30307   # Save the first 10 bytes of this path to the storage, so fixpath can work.
30308   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30309 
30310     else
30311       # We're on a unix platform. Hooray! :)
30312       path="$BOOT_JDK"
30313       has_space=`$ECHO "$path" | $GREP " "`
30314       if test "x$has_space" != x; then
30315         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30316 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30317         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30318       fi
30319 
30320       # Use eval to expand a potential ~
30321       eval path="$path"
30322       if test ! -f "$path" && test ! -d "$path"; then
30323         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30324       fi
30325 
30326       if test -d "$path"; then
30327         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30328       else
30329         dir="`$DIRNAME "$path"`"
30330         base="`$BASENAME "$path"`"
30331         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30332       fi
30333     fi
30334   fi
30335 
30336             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30337 $as_echo_n "checking for Boot JDK... " >&6; }
30338             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30339 $as_echo "$BOOT_JDK" >&6; }
30340             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30341 $as_echo_n "checking Boot JDK version... " >&6; }
30342             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30343             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30344 $as_echo "$BOOT_JDK_VERSION" >&6; }
30345           fi # end check jdk version
30346         fi # end check javac
30347       fi # end check java
30348     fi # end check boot jdk found
30349   fi
30350 
30351 
30352   # If we haven't found anything yet, we've truly lost. Give up.
30353   if test "x$BOOT_JDK_FOUND" = xno; then
30354 
30355   # Print a helpful message on how to acquire the necessary build dependency.
30356   # openjdk is the help tag: freetype, cups, alsa etc
30357   MISSING_DEPENDENCY=openjdk
30358 
30359   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30360     cygwin_help $MISSING_DEPENDENCY
30361   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30362     msys_help $MISSING_DEPENDENCY
30363   else
30364     PKGHANDLER_COMMAND=
30365 
30366     case $PKGHANDLER in
30367       apt-get)
30368         apt_help     $MISSING_DEPENDENCY ;;
30369       yum)
30370         yum_help     $MISSING_DEPENDENCY ;;
30371       brew)
30372         brew_help    $MISSING_DEPENDENCY ;;
30373       port)
30374         port_help    $MISSING_DEPENDENCY ;;
30375       pkgutil)
30376         pkgutil_help $MISSING_DEPENDENCY ;;
30377       pkgadd)
30378         pkgadd_help  $MISSING_DEPENDENCY ;;
30379     esac
30380 
30381     if test "x$PKGHANDLER_COMMAND" != x; then
30382       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30383     fi
30384   fi
30385 
30386     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
30387 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
30388     { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitly setting --with-boot-jdk" >&5
30389 $as_echo "$as_me: This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30390     as_fn_error $? "Cannot continue" "$LINENO" 5
30391   fi
30392 
30393 
30394 
30395   # Setup tools from the Boot JDK.
30396 
30397   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30398 
30399   # Publish this variable in the help.
30400 
30401 
30402   if [ -z "${JAVA+x}" ]; then
30403     # The variable is not set by user, try to locate tool using the code snippet
30404 
30405       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30406 $as_echo_n "checking for java in Boot JDK... " >&6; }
30407       JAVA=$BOOT_JDK/bin/java
30408       if test ! -x $JAVA; then
30409         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30410 $as_echo "not found" >&6; }
30411         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30412 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30413         as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30414       fi
30415       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30416 $as_echo "ok" >&6; }
30417 
30418 
30419   else
30420     # The variable is set, but is it from the command line or the environment?
30421 
30422     # Try to remove the string !JAVA! from our list.
30423     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
30424     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30425       # If it failed, the variable was not from the command line. Ignore it,
30426       # but warn the user (except for BASH, which is always set by the calling BASH).
30427       if test "xJAVA" != xBASH; then
30428         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
30429 $as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
30430       fi
30431       # Try to locate tool using the code snippet
30432 
30433       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30434 $as_echo_n "checking for java in Boot JDK... " >&6; }
30435       JAVA=$BOOT_JDK/bin/java
30436       if test ! -x $JAVA; then
30437         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30438 $as_echo "not found" >&6; }
30439         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30440 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30441         as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30442       fi
30443       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30444 $as_echo "ok" >&6; }
30445 
30446 
30447     else
30448       # If it succeeded, then it was overridden by the user. We will use it
30449       # for the tool.
30450 
30451       # First remove it from the list of overridden variables, so we can test
30452       # for unknown variables in the end.
30453       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30454 
30455       # Check if we try to supply an empty value
30456       if test "x$JAVA" = x; then
30457         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
30458 $as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
30459         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30460 $as_echo_n "checking for JAVA... " >&6; }
30461         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30462 $as_echo "disabled" >&6; }
30463       else
30464         # Check if the provided tool contains a complete path.
30465         tool_specified="$JAVA"
30466         tool_basename="${tool_specified##*/}"
30467         if test "x$tool_basename" = "x$tool_specified"; then
30468           # A command without a complete path is provided, search $PATH.
30469           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
30470 $as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
30471           # Extract the first word of "$tool_basename", so it can be a program name with args.
30472 set dummy $tool_basename; ac_word=$2
30473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30474 $as_echo_n "checking for $ac_word... " >&6; }
30475 if ${ac_cv_path_JAVA+:} false; then :
30476   $as_echo_n "(cached) " >&6
30477 else
30478   case $JAVA in
30479   [\\/]* | ?:[\\/]*)
30480   ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
30481   ;;
30482   *)
30483   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30484 for as_dir in $PATH
30485 do
30486   IFS=$as_save_IFS
30487   test -z "$as_dir" && as_dir=.
30488     for ac_exec_ext in '' $ac_executable_extensions; do
30489   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30490     ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
30491     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30492     break 2
30493   fi
30494 done
30495   done
30496 IFS=$as_save_IFS
30497 
30498   ;;
30499 esac
30500 fi
30501 JAVA=$ac_cv_path_JAVA
30502 if test -n "$JAVA"; then
30503   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
30504 $as_echo "$JAVA" >&6; }
30505 else
30506   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30507 $as_echo "no" >&6; }
30508 fi
30509 
30510 
30511           if test "x$JAVA" = x; then
30512             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30513           fi
30514         else
30515           # Otherwise we believe it is a complete path. Use it as it is.
30516           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30517 $as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30518           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30519 $as_echo_n "checking for JAVA... " >&6; }
30520           if test ! -x "$tool_specified"; then
30521             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30522 $as_echo "not found" >&6; }
30523             as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30524           fi
30525           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30526 $as_echo "$tool_specified" >&6; }
30527         fi
30528       fi
30529     fi
30530 
30531   fi
30532 
30533 
30534 
30535   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30536 
30537   # Publish this variable in the help.
30538 
30539 
30540   if [ -z "${JAVAC+x}" ]; then
30541     # The variable is not set by user, try to locate tool using the code snippet
30542 
30543       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30544 $as_echo_n "checking for javac in Boot JDK... " >&6; }
30545       JAVAC=$BOOT_JDK/bin/javac
30546       if test ! -x $JAVAC; then
30547         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30548 $as_echo "not found" >&6; }
30549         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30550 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30551         as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30552       fi
30553       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30554 $as_echo "ok" >&6; }
30555 
30556 
30557   else
30558     # The variable is set, but is it from the command line or the environment?
30559 
30560     # Try to remove the string !JAVAC! from our list.
30561     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30562     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30563       # If it failed, the variable was not from the command line. Ignore it,
30564       # but warn the user (except for BASH, which is always set by the calling BASH).
30565       if test "xJAVAC" != xBASH; then
30566         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30567 $as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30568       fi
30569       # Try to locate tool using the code snippet
30570 
30571       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30572 $as_echo_n "checking for javac in Boot JDK... " >&6; }
30573       JAVAC=$BOOT_JDK/bin/javac
30574       if test ! -x $JAVAC; then
30575         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30576 $as_echo "not found" >&6; }
30577         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30578 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30579         as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30580       fi
30581       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30582 $as_echo "ok" >&6; }
30583 
30584 
30585     else
30586       # If it succeeded, then it was overridden by the user. We will use it
30587       # for the tool.
30588 
30589       # First remove it from the list of overridden variables, so we can test
30590       # for unknown variables in the end.
30591       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30592 
30593       # Check if we try to supply an empty value
30594       if test "x$JAVAC" = x; then
30595         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30596 $as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30597         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30598 $as_echo_n "checking for JAVAC... " >&6; }
30599         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30600 $as_echo "disabled" >&6; }
30601       else
30602         # Check if the provided tool contains a complete path.
30603         tool_specified="$JAVAC"
30604         tool_basename="${tool_specified##*/}"
30605         if test "x$tool_basename" = "x$tool_specified"; then
30606           # A command without a complete path is provided, search $PATH.
30607           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30608 $as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30609           # Extract the first word of "$tool_basename", so it can be a program name with args.
30610 set dummy $tool_basename; ac_word=$2
30611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30612 $as_echo_n "checking for $ac_word... " >&6; }
30613 if ${ac_cv_path_JAVAC+:} false; then :
30614   $as_echo_n "(cached) " >&6
30615 else
30616   case $JAVAC in
30617   [\\/]* | ?:[\\/]*)
30618   ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
30619   ;;
30620   *)
30621   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30622 for as_dir in $PATH
30623 do
30624   IFS=$as_save_IFS
30625   test -z "$as_dir" && as_dir=.
30626     for ac_exec_ext in '' $ac_executable_extensions; do
30627   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30628     ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
30629     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30630     break 2
30631   fi
30632 done
30633   done
30634 IFS=$as_save_IFS
30635 
30636   ;;
30637 esac
30638 fi
30639 JAVAC=$ac_cv_path_JAVAC
30640 if test -n "$JAVAC"; then
30641   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
30642 $as_echo "$JAVAC" >&6; }
30643 else
30644   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30645 $as_echo "no" >&6; }
30646 fi
30647 
30648 
30649           if test "x$JAVAC" = x; then
30650             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30651           fi
30652         else
30653           # Otherwise we believe it is a complete path. Use it as it is.
30654           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
30655 $as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
30656           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30657 $as_echo_n "checking for JAVAC... " >&6; }
30658           if test ! -x "$tool_specified"; then
30659             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30660 $as_echo "not found" >&6; }
30661             as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
30662           fi
30663           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30664 $as_echo "$tool_specified" >&6; }
30665         fi
30666       fi
30667     fi
30668 
30669   fi
30670 
30671 
30672 
30673   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30674 
30675   # Publish this variable in the help.
30676 
30677 
30678   if [ -z "${JAVAH+x}" ]; then
30679     # The variable is not set by user, try to locate tool using the code snippet
30680 
30681       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30682 $as_echo_n "checking for javah in Boot JDK... " >&6; }
30683       JAVAH=$BOOT_JDK/bin/javah
30684       if test ! -x $JAVAH; then
30685         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30686 $as_echo "not found" >&6; }
30687         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30688 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30689         as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30690       fi
30691       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30692 $as_echo "ok" >&6; }
30693 
30694 
30695   else
30696     # The variable is set, but is it from the command line or the environment?
30697 
30698     # Try to remove the string !JAVAH! from our list.
30699     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
30700     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30701       # If it failed, the variable was not from the command line. Ignore it,
30702       # but warn the user (except for BASH, which is always set by the calling BASH).
30703       if test "xJAVAH" != xBASH; then
30704         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
30705 $as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
30706       fi
30707       # Try to locate tool using the code snippet
30708 
30709       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30710 $as_echo_n "checking for javah in Boot JDK... " >&6; }
30711       JAVAH=$BOOT_JDK/bin/javah
30712       if test ! -x $JAVAH; then
30713         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30714 $as_echo "not found" >&6; }
30715         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30716 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30717         as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30718       fi
30719       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30720 $as_echo "ok" >&6; }
30721 
30722 
30723     else
30724       # If it succeeded, then it was overridden by the user. We will use it
30725       # for the tool.
30726 
30727       # First remove it from the list of overridden variables, so we can test
30728       # for unknown variables in the end.
30729       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30730 
30731       # Check if we try to supply an empty value
30732       if test "x$JAVAH" = x; then
30733         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
30734 $as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
30735         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30736 $as_echo_n "checking for JAVAH... " >&6; }
30737         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30738 $as_echo "disabled" >&6; }
30739       else
30740         # Check if the provided tool contains a complete path.
30741         tool_specified="$JAVAH"
30742         tool_basename="${tool_specified##*/}"
30743         if test "x$tool_basename" = "x$tool_specified"; then
30744           # A command without a complete path is provided, search $PATH.
30745           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
30746 $as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
30747           # Extract the first word of "$tool_basename", so it can be a program name with args.
30748 set dummy $tool_basename; ac_word=$2
30749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30750 $as_echo_n "checking for $ac_word... " >&6; }
30751 if ${ac_cv_path_JAVAH+:} false; then :
30752   $as_echo_n "(cached) " >&6
30753 else
30754   case $JAVAH in
30755   [\\/]* | ?:[\\/]*)
30756   ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
30757   ;;
30758   *)
30759   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30760 for as_dir in $PATH
30761 do
30762   IFS=$as_save_IFS
30763   test -z "$as_dir" && as_dir=.
30764     for ac_exec_ext in '' $ac_executable_extensions; do
30765   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30766     ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
30767     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30768     break 2
30769   fi
30770 done
30771   done
30772 IFS=$as_save_IFS
30773 
30774   ;;
30775 esac
30776 fi
30777 JAVAH=$ac_cv_path_JAVAH
30778 if test -n "$JAVAH"; then
30779   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
30780 $as_echo "$JAVAH" >&6; }
30781 else
30782   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30783 $as_echo "no" >&6; }
30784 fi
30785 
30786 
30787           if test "x$JAVAH" = x; then
30788             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30789           fi
30790         else
30791           # Otherwise we believe it is a complete path. Use it as it is.
30792           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
30793 $as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
30794           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30795 $as_echo_n "checking for JAVAH... " >&6; }
30796           if test ! -x "$tool_specified"; then
30797             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30798 $as_echo "not found" >&6; }
30799             as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
30800           fi
30801           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30802 $as_echo "$tool_specified" >&6; }
30803         fi
30804       fi
30805     fi
30806 
30807   fi
30808 
30809 
30810 
30811   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30812 
30813   # Publish this variable in the help.
30814 
30815 
30816   if [ -z "${JAR+x}" ]; then
30817     # The variable is not set by user, try to locate tool using the code snippet
30818 
30819       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30820 $as_echo_n "checking for jar in Boot JDK... " >&6; }
30821       JAR=$BOOT_JDK/bin/jar
30822       if test ! -x $JAR; then
30823         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30824 $as_echo "not found" >&6; }
30825         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30826 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30827         as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30828       fi
30829       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30830 $as_echo "ok" >&6; }
30831 
30832 
30833   else
30834     # The variable is set, but is it from the command line or the environment?
30835 
30836     # Try to remove the string !JAR! from our list.
30837     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
30838     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30839       # If it failed, the variable was not from the command line. Ignore it,
30840       # but warn the user (except for BASH, which is always set by the calling BASH).
30841       if test "xJAR" != xBASH; then
30842         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
30843 $as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
30844       fi
30845       # Try to locate tool using the code snippet
30846 
30847       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30848 $as_echo_n "checking for jar in Boot JDK... " >&6; }
30849       JAR=$BOOT_JDK/bin/jar
30850       if test ! -x $JAR; then
30851         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30852 $as_echo "not found" >&6; }
30853         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30854 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30855         as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30856       fi
30857       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30858 $as_echo "ok" >&6; }
30859 
30860 
30861     else
30862       # If it succeeded, then it was overridden by the user. We will use it
30863       # for the tool.
30864 
30865       # First remove it from the list of overridden variables, so we can test
30866       # for unknown variables in the end.
30867       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30868 
30869       # Check if we try to supply an empty value
30870       if test "x$JAR" = x; then
30871         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
30872 $as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
30873         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30874 $as_echo_n "checking for JAR... " >&6; }
30875         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30876 $as_echo "disabled" >&6; }
30877       else
30878         # Check if the provided tool contains a complete path.
30879         tool_specified="$JAR"
30880         tool_basename="${tool_specified##*/}"
30881         if test "x$tool_basename" = "x$tool_specified"; then
30882           # A command without a complete path is provided, search $PATH.
30883           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
30884 $as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
30885           # Extract the first word of "$tool_basename", so it can be a program name with args.
30886 set dummy $tool_basename; ac_word=$2
30887 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30888 $as_echo_n "checking for $ac_word... " >&6; }
30889 if ${ac_cv_path_JAR+:} false; then :
30890   $as_echo_n "(cached) " >&6
30891 else
30892   case $JAR in
30893   [\\/]* | ?:[\\/]*)
30894   ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
30895   ;;
30896   *)
30897   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30898 for as_dir in $PATH
30899 do
30900   IFS=$as_save_IFS
30901   test -z "$as_dir" && as_dir=.
30902     for ac_exec_ext in '' $ac_executable_extensions; do
30903   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30904     ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
30905     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30906     break 2
30907   fi
30908 done
30909   done
30910 IFS=$as_save_IFS
30911 
30912   ;;
30913 esac
30914 fi
30915 JAR=$ac_cv_path_JAR
30916 if test -n "$JAR"; then
30917   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
30918 $as_echo "$JAR" >&6; }
30919 else
30920   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30921 $as_echo "no" >&6; }
30922 fi
30923 
30924 
30925           if test "x$JAR" = x; then
30926             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30927           fi
30928         else
30929           # Otherwise we believe it is a complete path. Use it as it is.
30930           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
30931 $as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
30932           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30933 $as_echo_n "checking for JAR... " >&6; }
30934           if test ! -x "$tool_specified"; then
30935             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30936 $as_echo "not found" >&6; }
30937             as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
30938           fi
30939           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30940 $as_echo "$tool_specified" >&6; }
30941         fi
30942       fi
30943     fi
30944 
30945   fi
30946 
30947 
30948 
30949   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30950 
30951   # Publish this variable in the help.
30952 
30953 
30954   if [ -z "${JARSIGNER+x}" ]; then
30955     # The variable is not set by user, try to locate tool using the code snippet
30956 
30957       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30958 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30959       JARSIGNER=$BOOT_JDK/bin/jarsigner
30960       if test ! -x $JARSIGNER; then
30961         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30962 $as_echo "not found" >&6; }
30963         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30964 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30965         as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30966       fi
30967       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30968 $as_echo "ok" >&6; }
30969 
30970 
30971   else
30972     # The variable is set, but is it from the command line or the environment?
30973 
30974     # Try to remove the string !JARSIGNER! from our list.
30975     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
30976     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30977       # If it failed, the variable was not from the command line. Ignore it,
30978       # but warn the user (except for BASH, which is always set by the calling BASH).
30979       if test "xJARSIGNER" != xBASH; then
30980         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
30981 $as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
30982       fi
30983       # Try to locate tool using the code snippet
30984 
30985       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30986 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30987       JARSIGNER=$BOOT_JDK/bin/jarsigner
30988       if test ! -x $JARSIGNER; then
30989         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30990 $as_echo "not found" >&6; }
30991         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30992 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30993         as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30994       fi
30995       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30996 $as_echo "ok" >&6; }
30997 
30998 
30999     else
31000       # If it succeeded, then it was overridden by the user. We will use it
31001       # for the tool.
31002 
31003       # First remove it from the list of overridden variables, so we can test
31004       # for unknown variables in the end.
31005       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31006 
31007       # Check if we try to supply an empty value
31008       if test "x$JARSIGNER" = x; then
31009         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
31010 $as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
31011         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
31012 $as_echo_n "checking for JARSIGNER... " >&6; }
31013         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
31014 $as_echo "disabled" >&6; }
31015       else
31016         # Check if the provided tool contains a complete path.
31017         tool_specified="$JARSIGNER"
31018         tool_basename="${tool_specified##*/}"
31019         if test "x$tool_basename" = "x$tool_specified"; then
31020           # A command without a complete path is provided, search $PATH.
31021           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
31022 $as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
31023           # Extract the first word of "$tool_basename", so it can be a program name with args.
31024 set dummy $tool_basename; ac_word=$2
31025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31026 $as_echo_n "checking for $ac_word... " >&6; }
31027 if ${ac_cv_path_JARSIGNER+:} false; then :
31028   $as_echo_n "(cached) " >&6
31029 else
31030   case $JARSIGNER in
31031   [\\/]* | ?:[\\/]*)
31032   ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
31033   ;;
31034   *)
31035   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31036 for as_dir in $PATH
31037 do
31038   IFS=$as_save_IFS
31039   test -z "$as_dir" && as_dir=.
31040     for ac_exec_ext in '' $ac_executable_extensions; do
31041   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31042     ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
31043     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31044     break 2
31045   fi
31046 done
31047   done
31048 IFS=$as_save_IFS
31049 
31050   ;;
31051 esac
31052 fi
31053 JARSIGNER=$ac_cv_path_JARSIGNER
31054 if test -n "$JARSIGNER"; then
31055   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
31056 $as_echo "$JARSIGNER" >&6; }
31057 else
31058   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31059 $as_echo "no" >&6; }
31060 fi
31061 
31062 
31063           if test "x$JARSIGNER" = x; then
31064             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31065           fi
31066         else
31067           # Otherwise we believe it is a complete path. Use it as it is.
31068           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
31069 $as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
31070           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
31071 $as_echo_n "checking for JARSIGNER... " >&6; }
31072           if test ! -x "$tool_specified"; then
31073             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31074 $as_echo "not found" >&6; }
31075             as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
31076           fi
31077           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31078 $as_echo "$tool_specified" >&6; }
31079         fi
31080       fi
31081     fi
31082 
31083   fi
31084 
31085 
31086 
31087   # Finally, set some other options...
31088 
31089   # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
31090   BOOT_JDK_SOURCETARGET="-source 8 -target 8"
31091 
31092 
31093   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
31094 $as_echo_n "checking if Boot JDK supports modules... " >&6; }
31095   if "$JAVA" --list-modules > /dev/null 2>&1; then
31096     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31097 $as_echo "yes" >&6; }
31098     BOOT_JDK_MODULAR="true"
31099   else
31100     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31101 $as_echo "no" >&6; }
31102     BOOT_JDK_MODULAR="false"
31103   fi
31104 
31105 
31106 
31107 
31108   # Check if the boot jdk is 32 or 64 bit
31109   if "$JAVA" -d64 -version > /dev/null 2>&1; then
31110     BOOT_JDK_BITS="64"
31111   else
31112     BOOT_JDK_BITS="32"
31113   fi
31114   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
31115 $as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
31116   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
31117 $as_echo "$BOOT_JDK_BITS" >&6; }
31118 
31119 
31120 
31121 # Check whether --with-build-jdk was given.
31122 if test "${with_build_jdk+set}" = set; then :
31123   withval=$with_build_jdk;
31124 fi
31125 
31126 
31127   CREATE_BUILDJDK=false
31128   EXTERNAL_BUILDJDK=false
31129   BUILD_JDK_FOUND="no"
31130   if test "x$with_build_jdk" != "x"; then
31131 
31132   if test "x$BUILD_JDK_FOUND" = xno; then
31133     # Execute the test
31134 
31135        if test "x$with_build_jdk" != x; then
31136          BUILD_JDK=$with_build_jdk
31137          BUILD_JDK_FOUND=maybe
31138          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
31139 $as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
31140        fi
31141 
31142     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
31143     if test "x$BUILD_JDK_FOUND" = xmaybe; then
31144       # Do we have a bin/java?
31145       if test ! -x "$BUILD_JDK/bin/java"; then
31146         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
31147 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
31148         BUILD_JDK_FOUND=no
31149       elif test ! -x "$BUILD_JDK/bin/jlink"; then
31150         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
31151 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
31152         BUILD_JDK_FOUND=no
31153       elif test ! -x "$BUILD_JDK/bin/jmod"; then
31154         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
31155 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
31156         BUILD_JDK_FOUND=no
31157       elif test ! -x "$BUILD_JDK/bin/javac"; then
31158         # Do we have a bin/javac?
31159         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
31160 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
31161         { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
31162 $as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
31163         BUILD_JDK_FOUND=no
31164       else
31165         # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
31166         BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
31167 
31168         # Extra M4 quote needed to protect [] in grep expression.
31169         FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
31170         if test "x$FOUND_CORRECT_VERSION" = x; then
31171           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
31172 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
31173           { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
31174 $as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
31175           BUILD_JDK_FOUND=no
31176         else
31177           # We're done!
31178           BUILD_JDK_FOUND=yes
31179 
31180   # Only process if variable expands to non-empty
31181 
31182   if test "x$BUILD_JDK" != x; then
31183     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31184 
31185   # Input might be given as Windows format, start by converting to
31186   # unix format.
31187   path="$BUILD_JDK"
31188   new_path=`$CYGPATH -u "$path"`
31189 
31190   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31191   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31192   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31193   # "foo.exe" is OK but "foo" is an error.
31194   #
31195   # This test is therefore slightly more accurate than "test -f" to check for file precense.
31196   # It is also a way to make sure we got the proper file name for the real test later on.
31197   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31198   if test "x$test_shortpath" = x; then
31199     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
31200 $as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
31201     as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
31202   fi
31203 
31204   # Call helper function which possibly converts this using DOS-style short mode.
31205   # If so, the updated path is stored in $new_path.
31206 
31207   input_path="$new_path"
31208   # Check if we need to convert this using DOS-style short mode. If the path
31209   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31210   # take no chances and rewrite it.
31211   # Note: m4 eats our [], so we need to use [ and ] instead.
31212   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31213   if test "x$has_forbidden_chars" != x; then
31214     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31215     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31216     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31217     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31218       # Going to short mode and back again did indeed matter. Since short mode is
31219       # case insensitive, let's make it lowercase to improve readability.
31220       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31221       # Now convert it back to Unix-style (cygpath)
31222       input_path=`$CYGPATH -u "$shortmode_path"`
31223       new_path="$input_path"
31224     fi
31225   fi
31226 
31227   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31228   if test "x$test_cygdrive_prefix" = x; then
31229     # As a simple fix, exclude /usr/bin since it's not a real path.
31230     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31231       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31232       # a path prefixed by /cygdrive for fixpath to work.
31233       new_path="$CYGWIN_ROOT_PATH$input_path"
31234     fi
31235   fi
31236 
31237 
31238   if test "x$path" != "x$new_path"; then
31239     BUILD_JDK="$new_path"
31240     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
31241 $as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
31242   fi
31243 
31244     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31245 
31246   path="$BUILD_JDK"
31247   has_colon=`$ECHO $path | $GREP ^.:`
31248   new_path="$path"
31249   if test "x$has_colon" = x; then
31250     # Not in mixed or Windows style, start by that.
31251     new_path=`cmd //c echo $path`
31252   fi
31253 
31254 
31255   input_path="$new_path"
31256   # Check if we need to convert this using DOS-style short mode. If the path
31257   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31258   # take no chances and rewrite it.
31259   # Note: m4 eats our [], so we need to use [ and ] instead.
31260   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31261   if test "x$has_forbidden_chars" != x; then
31262     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31263     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31264   fi
31265 
31266 
31267   windows_path="$new_path"
31268   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31269     unix_path=`$CYGPATH -u "$windows_path"`
31270     new_path="$unix_path"
31271   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31272     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31273     new_path="$unix_path"
31274   fi
31275 
31276   if test "x$path" != "x$new_path"; then
31277     BUILD_JDK="$new_path"
31278     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
31279 $as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
31280   fi
31281 
31282   # Save the first 10 bytes of this path to the storage, so fixpath can work.
31283   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31284 
31285     else
31286       # We're on a unix platform. Hooray! :)
31287       path="$BUILD_JDK"
31288       has_space=`$ECHO "$path" | $GREP " "`
31289       if test "x$has_space" != x; then
31290         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
31291 $as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
31292         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31293       fi
31294 
31295       # Use eval to expand a potential ~
31296       eval path="$path"
31297       if test ! -f "$path" && test ! -d "$path"; then
31298         as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
31299       fi
31300 
31301       if test -d "$path"; then
31302         BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
31303       else
31304         dir="`$DIRNAME "$path"`"
31305         base="`$BASENAME "$path"`"
31306         BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
31307       fi
31308     fi
31309   fi
31310 
31311           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31312 $as_echo_n "checking for Build JDK... " >&6; }
31313           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
31314 $as_echo "$BUILD_JDK" >&6; }
31315           { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
31316 $as_echo_n "checking Build JDK version... " >&6; }
31317           BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
31318           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
31319 $as_echo "$BUILD_JDK_VERSION" >&6; }
31320         fi # end check jdk version
31321       fi # end check java
31322     fi # end check build jdk found
31323   fi
31324 
31325     EXTERNAL_BUILDJDK=true
31326   else
31327     if test "x$COMPILE_TYPE" = "xcross"; then
31328       BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
31329       BUILD_JDK_FOUND=yes
31330       CREATE_BUILDJDK=true
31331       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31332 $as_echo_n "checking for Build JDK... " >&6; }
31333       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
31334 $as_echo "yes, will build it for the host platform" >&6; }
31335     else
31336       BUILD_JDK="\$(JDK_OUTPUTDIR)"
31337       BUILD_JDK_FOUND=yes
31338       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31339 $as_echo_n "checking for Build JDK... " >&6; }
31340       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
31341 $as_echo "yes, will use output dir" >&6; }
31342     fi
31343   fi
31344 
31345   JMOD="$BUILD_JDK/bin/jmod"
31346   JLINK="$BUILD_JDK/bin/jlink"
31347 
31348 
31349 
31350   if test "x$BUILD_JDK_FOUND" != "xyes"; then
31351     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31352 $as_echo_n "checking for Build JDK... " >&6; }
31353     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31354 $as_echo "no" >&6; }
31355     as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
31356   fi
31357 
31358 
31359 
31360 
31361 
31362 
31363 ###############################################################################
31364 #
31365 # Configure the sources to use. We can add or override individual directories.
31366 #
31367 ###############################################################################
31368 
31369 
31370   # Where are the sources.
31371   LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
31372   CORBA_TOPDIR="$SRC_ROOT/corba"
31373   JAXP_TOPDIR="$SRC_ROOT/jaxp"
31374   JAXWS_TOPDIR="$SRC_ROOT/jaxws"
31375   HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
31376   NASHORN_TOPDIR="$SRC_ROOT/nashorn"
31377   JDK_TOPDIR="$SRC_ROOT/jdk"
31378 
31379 
31380 
31381 
31382 
31383 
31384 
31385 
31386 
31387   # This feature is no longer supported.
31388 
31389 
31390 
31391 # Check whether --with-add-source-root was given.
31392 if test "${with_add_source_root+set}" = set; then :
31393   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
31394 $as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
31395 fi
31396 
31397 
31398 
31399 
31400 # Check whether --with-override-source-root was given.
31401 if test "${with_override_source_root+set}" = set; then :
31402   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
31403 $as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
31404 fi
31405 
31406 
31407 
31408 
31409 # Check whether --with-adds-and-overrides was given.
31410 if test "${with_adds_and_overrides+set}" = set; then :
31411   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
31412 $as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
31413 fi
31414 
31415 
31416 
31417 
31418 # Check whether --with-override-langtools was given.
31419 if test "${with_override_langtools+set}" = set; then :
31420   withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
31421 $as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
31422 fi
31423 
31424 
31425 
31426 
31427 # Check whether --with-override-corba was given.
31428 if test "${with_override_corba+set}" = set; then :
31429   withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
31430 $as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
31431 fi
31432 
31433 
31434 
31435 
31436 # Check whether --with-override-jaxp was given.
31437 if test "${with_override_jaxp+set}" = set; then :
31438   withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
31439 $as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
31440 fi
31441 
31442 
31443 
31444 
31445 # Check whether --with-override-jaxws was given.
31446 if test "${with_override_jaxws+set}" = set; then :
31447   withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
31448 $as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
31449 fi
31450 
31451 
31452 
31453 
31454 # Check whether --with-override-hotspot was given.
31455 if test "${with_override_hotspot+set}" = set; then :
31456   withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
31457 $as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
31458 fi
31459 
31460 
31461 
31462 
31463 # Check whether --with-override-nashorn was given.
31464 if test "${with_override_nashorn+set}" = set; then :
31465   withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
31466 $as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
31467 fi
31468 
31469 
31470 
31471 
31472 # Check whether --with-override-jdk was given.
31473 if test "${with_override_jdk+set}" = set; then :
31474   withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
31475 $as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
31476 fi
31477 
31478 
31479 
31480 
31481   BUILD_OUTPUT="$OUTPUT_ROOT"
31482 
31483   JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
31484 
31485 
31486 
31487 # Check whether --with-import_hotspot was given.
31488 if test "${with_import_hotspot+set}" = set; then :
31489   withval=$with_import_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&5
31490 $as_echo "$as_me: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&2;}
31491 fi
31492 
31493 
31494 
31495 
31496 
31497 
31498 # Check whether --with-import-modules was given.
31499 if test "${with_import_modules+set}" = set; then :
31500   withval=$with_import_modules;
31501 fi
31502 
31503 
31504   if test "x$with_import_modules" != x \
31505       && test "x$with_import_modules" != "xno"; then
31506     if test -d "$with_import_modules"; then
31507       IMPORT_MODULES_TOPDIR="$with_import_modules"
31508 
31509   # Only process if variable expands to non-empty
31510 
31511   if test "x$IMPORT_MODULES_TOPDIR" != x; then
31512     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31513 
31514   # Input might be given as Windows format, start by converting to
31515   # unix format.
31516   path="$IMPORT_MODULES_TOPDIR"
31517   new_path=`$CYGPATH -u "$path"`
31518 
31519   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31520   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31521   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31522   # "foo.exe" is OK but "foo" is an error.
31523   #
31524   # This test is therefore slightly more accurate than "test -f" to check for file precense.
31525   # It is also a way to make sure we got the proper file name for the real test later on.
31526   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31527   if test "x$test_shortpath" = x; then
31528     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31529 $as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31530     as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31531   fi
31532 
31533   # Call helper function which possibly converts this using DOS-style short mode.
31534   # If so, the updated path is stored in $new_path.
31535 
31536   input_path="$new_path"
31537   # Check if we need to convert this using DOS-style short mode. If the path
31538   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31539   # take no chances and rewrite it.
31540   # Note: m4 eats our [], so we need to use [ and ] instead.
31541   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31542   if test "x$has_forbidden_chars" != x; then
31543     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31544     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31545     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31546     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31547       # Going to short mode and back again did indeed matter. Since short mode is
31548       # case insensitive, let's make it lowercase to improve readability.
31549       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31550       # Now convert it back to Unix-style (cygpath)
31551       input_path=`$CYGPATH -u "$shortmode_path"`
31552       new_path="$input_path"
31553     fi
31554   fi
31555 
31556   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31557   if test "x$test_cygdrive_prefix" = x; then
31558     # As a simple fix, exclude /usr/bin since it's not a real path.
31559     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31560       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31561       # a path prefixed by /cygdrive for fixpath to work.
31562       new_path="$CYGWIN_ROOT_PATH$input_path"
31563     fi
31564   fi
31565 
31566 
31567   if test "x$path" != "x$new_path"; then
31568     IMPORT_MODULES_TOPDIR="$new_path"
31569     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31570 $as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31571   fi
31572 
31573     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31574 
31575   path="$IMPORT_MODULES_TOPDIR"
31576   has_colon=`$ECHO $path | $GREP ^.:`
31577   new_path="$path"
31578   if test "x$has_colon" = x; then
31579     # Not in mixed or Windows style, start by that.
31580     new_path=`cmd //c echo $path`
31581   fi
31582 
31583 
31584   input_path="$new_path"
31585   # Check if we need to convert this using DOS-style short mode. If the path
31586   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31587   # take no chances and rewrite it.
31588   # Note: m4 eats our [], so we need to use [ and ] instead.
31589   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31590   if test "x$has_forbidden_chars" != x; then
31591     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31592     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31593   fi
31594 
31595 
31596   windows_path="$new_path"
31597   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31598     unix_path=`$CYGPATH -u "$windows_path"`
31599     new_path="$unix_path"
31600   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31601     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31602     new_path="$unix_path"
31603   fi
31604 
31605   if test "x$path" != "x$new_path"; then
31606     IMPORT_MODULES_TOPDIR="$new_path"
31607     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31608 $as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31609   fi
31610 
31611   # Save the first 10 bytes of this path to the storage, so fixpath can work.
31612   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31613 
31614     else
31615       # We're on a unix platform. Hooray! :)
31616       path="$IMPORT_MODULES_TOPDIR"
31617       has_space=`$ECHO "$path" | $GREP " "`
31618       if test "x$has_space" != x; then
31619         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31620 $as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31621         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31622       fi
31623 
31624       # Use eval to expand a potential ~
31625       eval path="$path"
31626       if test ! -f "$path" && test ! -d "$path"; then
31627         as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
31628       fi
31629 
31630       if test -d "$path"; then
31631         IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
31632       else
31633         dir="`$DIRNAME "$path"`"
31634         base="`$BASENAME "$path"`"
31635         IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
31636       fi
31637     fi
31638   fi
31639 
31640     elif test -e "$with_import_modules"; then
31641       IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
31642       $RM -rf "$IMPORT_MODULES_TOPDIR"
31643       $MKDIR -p "$IMPORT_MODULES_TOPDIR"
31644       if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
31645         as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31646       fi
31647     else
31648       as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31649     fi
31650   fi
31651 
31652   if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
31653     IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
31654   fi
31655   if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
31656     IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
31657   fi
31658   if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
31659     IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
31660   fi
31661   if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
31662     IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
31663   fi
31664   if test -d "$IMPORT_MODULES_TOPDIR/modules_legal"; then
31665     IMPORT_MODULES_LEGAL="$IMPORT_MODULES_TOPDIR/modules_legal"
31666   fi
31667   if test -d "$IMPORT_MODULES_TOPDIR/modules_man"; then
31668     IMPORT_MODULES_MAN="$IMPORT_MODULES_TOPDIR/modules_man"
31669   fi
31670   if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
31671     IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
31672   fi
31673   if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31674     IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31675   fi
31676 
31677 
31678 
31679 
31680 
31681 
31682 
31683 
31684 
31685 
31686 
31687 ###############################################################################
31688 #
31689 # Setup the toolchain (compilers etc), i.e. tools used to compile and process
31690 # native code.
31691 #
31692 ###############################################################################
31693 
31694 # See if we are doing a complete static build or not
31695 
31696   # Check whether --enable-static-build was given.
31697 if test "${enable_static_build+set}" = set; then :
31698   enableval=$enable_static_build;
31699 fi
31700 
31701   STATIC_BUILD=false
31702   if test "x$enable_static_build" = "xyes"; then
31703     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31704 $as_echo_n "checking if static build is enabled... " >&6; }
31705     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31706 $as_echo "yes" >&6; }
31707     if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
31708       as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
31709     fi
31710     STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
31711     CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31712     CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31713     STATIC_BUILD=true
31714   elif test "x$enable_static_build" = "xno"; then
31715     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31716 $as_echo_n "checking if static build is enabled... " >&6; }
31717     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31718 $as_echo "no" >&6; }
31719   elif test "x$enable_static_build" != "x"; then
31720     as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
31721   fi
31722 
31723 
31724 
31725 
31726 # First determine the toolchain type (compiler family)
31727 
31728 
31729 # Check whether --with-toolchain-type was given.
31730 if test "${with_toolchain_type+set}" = set; then :
31731   withval=$with_toolchain_type;
31732 fi
31733 
31734 
31735   # Use indirect variable referencing
31736   toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
31737   VALID_TOOLCHAINS=${!toolchain_var_name}
31738 
31739   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31740     if test -n "$XCODEBUILD"; then
31741       # On Mac OS X, default toolchain to clang after Xcode 5
31742       XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
31743       $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
31744       if test $? -ne 0; then
31745         as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
31746       fi
31747       XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
31748           $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
31749           $CUT -f 1 -d .`
31750       { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
31751 $as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
31752       if test $XCODE_MAJOR_VERSION -ge 5; then
31753           DEFAULT_TOOLCHAIN="clang"
31754       else
31755           DEFAULT_TOOLCHAIN="gcc"
31756       fi
31757     else
31758       # If Xcode is not installed, but the command line tools are
31759       # then we can't run xcodebuild. On these systems we should
31760       # default to clang
31761       DEFAULT_TOOLCHAIN="clang"
31762     fi
31763   else
31764     # First toolchain type in the list is the default
31765     DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
31766   fi
31767 
31768   if test "x$with_toolchain_type" = xlist; then
31769     # List all toolchains
31770     { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
31771 $as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
31772     for toolchain in $VALID_TOOLCHAINS; do
31773       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
31774       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31775       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
31776     done
31777 
31778     exit 0
31779   elif test "x$with_toolchain_type" != x; then
31780     # User override; check that it is valid
31781     if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
31782       { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
31783 $as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
31784       { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
31785 $as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
31786       as_fn_error $? "Cannot continue." "$LINENO" 5
31787     fi
31788     TOOLCHAIN_TYPE=$with_toolchain_type
31789   else
31790     # No flag given, use default
31791     TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
31792   fi
31793 
31794 
31795   TOOLCHAIN_CC_BINARY_clang="clang"
31796   TOOLCHAIN_CC_BINARY_gcc="gcc"
31797   TOOLCHAIN_CC_BINARY_microsoft="cl"
31798   TOOLCHAIN_CC_BINARY_solstudio="cc"
31799   TOOLCHAIN_CC_BINARY_xlc="xlc_r"
31800 
31801   TOOLCHAIN_CXX_BINARY_clang="clang++"
31802   TOOLCHAIN_CXX_BINARY_gcc="g++"
31803   TOOLCHAIN_CXX_BINARY_microsoft="cl"
31804   TOOLCHAIN_CXX_BINARY_solstudio="CC"
31805   TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
31806 
31807   # Use indirect variable referencing
31808   toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
31809   TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31810   toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
31811   TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
31812   toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
31813   TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
31814   toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
31815   TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
31816 
31817 
31818   # Define filename patterns
31819   if test "x$OPENJDK_TARGET_OS" = xwindows; then
31820     LIBRARY_PREFIX=
31821     SHARED_LIBRARY_SUFFIX='.dll'
31822     STATIC_LIBRARY_SUFFIX='.lib'
31823     SHARED_LIBRARY='$1.dll'
31824     STATIC_LIBRARY='$1.lib'
31825     OBJ_SUFFIX='.obj'
31826     EXE_SUFFIX='.exe'
31827   else
31828     LIBRARY_PREFIX=lib
31829     SHARED_LIBRARY_SUFFIX='.so'
31830     STATIC_LIBRARY_SUFFIX='.a'
31831     SHARED_LIBRARY='lib$1.so'
31832     STATIC_LIBRARY='lib$1.a'
31833     OBJ_SUFFIX='.o'
31834     EXE_SUFFIX=''
31835     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31836       # For full static builds, we're overloading the SHARED_LIBRARY
31837       # variables in order to limit the amount of changes required.
31838       # It would be better to remove SHARED and just use LIBRARY and
31839       # LIBRARY_SUFFIX for libraries that can be built either
31840       # shared or static and use STATIC_* for libraries that are
31841       # always built statically.
31842       if test "x$STATIC_BUILD" = xtrue; then
31843         SHARED_LIBRARY='lib$1.a'
31844         SHARED_LIBRARY_SUFFIX='.a'
31845       else
31846         SHARED_LIBRARY='lib$1.dylib'
31847         SHARED_LIBRARY_SUFFIX='.dylib'
31848       fi
31849     fi
31850   fi
31851 
31852 
31853 
31854 
31855 
31856 
31857 
31858 
31859 
31860 
31861   if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
31862     { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
31863 $as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
31864   else
31865     { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
31866 $as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
31867   fi
31868 
31869 
31870 # User supplied flags should be used when configure detects compilers
31871 
31872   if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
31873     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
31874 $as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
31875   fi
31876 
31877   if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
31878     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
31879 $as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
31880   fi
31881 
31882   if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
31883     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
31884 $as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
31885   fi
31886 
31887 
31888 # Check whether --with-extra-cflags was given.
31889 if test "${with_extra_cflags+set}" = set; then :
31890   withval=$with_extra_cflags;
31891 fi
31892 
31893 
31894 
31895 # Check whether --with-extra-cxxflags was given.
31896 if test "${with_extra_cxxflags+set}" = set; then :
31897   withval=$with_extra_cxxflags;
31898 fi
31899 
31900 
31901 
31902 # Check whether --with-extra-ldflags was given.
31903 if test "${with_extra_ldflags+set}" = set; then :
31904   withval=$with_extra_ldflags;
31905 fi
31906 
31907 
31908   EXTRA_CFLAGS="$with_extra_cflags"
31909   EXTRA_CXXFLAGS="$with_extra_cxxflags"
31910   EXTRA_LDFLAGS="$with_extra_ldflags"
31911 
31912 
31913 
31914 
31915 
31916   # The global CFLAGS and LDLAGS variables are used by configure tests and
31917   # should include the extra parameters
31918   CFLAGS="$EXTRA_CFLAGS"
31919   CXXFLAGS="$EXTRA_CXXFLAGS"
31920   LDFLAGS="$EXTRA_LDFLAGS"
31921   CPPFLAGS=""
31922 
31923 # The sysroot cflags are needed for configure to be able to run the compilers
31924 
31925   if test "x$SYSROOT" != "x"; then
31926     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31927       if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31928         # Solaris Studio does not have a concept of sysroot. Instead we must
31929         # make sure the default include and lib dirs are appended to each
31930         # compile and link command line. Must also add -I-xbuiltin to enable
31931         # inlining of system functions and intrinsics.
31932         SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
31933         SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
31934             -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
31935       fi
31936     elif test "x$TOOLCHAIN_TYPE" = xgcc; then
31937       SYSROOT_CFLAGS="--sysroot=$SYSROOT"
31938       SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
31939     elif test "x$TOOLCHAIN_TYPE" = xclang; then
31940       SYSROOT_CFLAGS="-isysroot $SYSROOT"
31941       SYSROOT_LDFLAGS="-isysroot $SYSROOT"
31942     fi
31943     # The global CFLAGS and LDFLAGS variables need these for configure to function
31944     CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
31945     CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
31946     CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
31947     LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
31948   fi
31949 
31950   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31951     # We also need -iframework<path>/System/Library/Frameworks
31952     SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31953     SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31954     # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
31955     # set this here so it doesn't have to be peppered throughout the forest
31956     SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31957     SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31958   fi
31959 
31960 
31961 
31962 
31963 
31964 # Then detect the actual binaries needed
31965 
31966   # FIXME: Is this needed?
31967   ac_ext=cpp
31968 ac_cpp='$CXXCPP $CPPFLAGS'
31969 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31970 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31971 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31972 
31973 
31974   # Store the CFLAGS etc passed to the configure script.
31975   ORG_CFLAGS="$CFLAGS"
31976   ORG_CXXFLAGS="$CXXFLAGS"
31977 
31978   # autoconf magic only relies on PATH, so update it if tools dir is specified
31979   OLD_PATH="$PATH"
31980 
31981   # On Windows, we need to detect the visual studio installation first.
31982   # This will change the PATH, but we need to keep that new PATH even
31983   # after toolchain detection is done, since the compiler (on x86) uses
31984   # it for DLL resolution in runtime.
31985   if test "x$OPENJDK_BUILD_OS" = "xwindows" \
31986       && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
31987 
31988   # Store path to cygwin link.exe to help excluding it when searching for
31989   # VS linker. This must be done before changing the PATH when looking for VS.
31990   # Extract the first word of "link", so it can be a program name with args.
31991 set dummy link; ac_word=$2
31992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31993 $as_echo_n "checking for $ac_word... " >&6; }
31994 if ${ac_cv_path_CYGWIN_LINK+:} false; then :
31995   $as_echo_n "(cached) " >&6
31996 else
31997   case $CYGWIN_LINK in
31998   [\\/]* | ?:[\\/]*)
31999   ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
32000   ;;
32001   *)
32002   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32003 for as_dir in $PATH
32004 do
32005   IFS=$as_save_IFS
32006   test -z "$as_dir" && as_dir=.
32007     for ac_exec_ext in '' $ac_executable_extensions; do
32008   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32009     ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
32010     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32011     break 2
32012   fi
32013 done
32014   done
32015 IFS=$as_save_IFS
32016 
32017   ;;
32018 esac
32019 fi
32020 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
32021 if test -n "$CYGWIN_LINK"; then
32022   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
32023 $as_echo "$CYGWIN_LINK" >&6; }
32024 else
32025   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32026 $as_echo "no" >&6; }
32027 fi
32028 
32029 
32030   if test "x$CYGWIN_LINK" != x; then
32031     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
32032 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
32033     "$CYGWIN_LINK" --version > /dev/null
32034     if test $? -eq 0 ; then
32035       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32036 $as_echo "yes" >&6; }
32037     else
32038       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32039 $as_echo "no" >&6; }
32040       # This might be the VS linker. Don't exclude it later on.
32041       CYGWIN_LINK=""
32042     fi
32043   fi
32044 
32045   # First-hand choice is to locate and run the vsvars bat file.
32046 
32047 
32048 # Check whether --with-toolchain-version was given.
32049 if test "${with_toolchain_version+set}" = set; then :
32050   withval=$with_toolchain_version;
32051 fi
32052 
32053 
32054   if test "x$with_toolchain_version" = xlist; then
32055     # List all toolchains
32056     { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
32057 $as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
32058     for version in $VALID_VS_VERSIONS; do
32059       eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
32060       $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
32061     done
32062 
32063     exit 0
32064   elif test "x$DEVKIT_VS_VERSION" != x; then
32065     VS_VERSION=$DEVKIT_VS_VERSION
32066     TOOLCHAIN_VERSION=$VS_VERSION
32067     eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32068     eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32069     eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32070     eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32071     eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32072     VS_PATH="$TOOLCHAIN_PATH:$PATH"
32073 
32074     # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
32075     # can still be exported as INCLUDE for compiler invocations without
32076     # SYSROOT_CFLAGS
32077     OLDIFS="$IFS"
32078     IFS=";"
32079     for i in $DEVKIT_VS_INCLUDE; do
32080       ipath=$i
32081 
32082   unix_path="$ipath"
32083   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32084     windows_path=`$CYGPATH -m "$unix_path"`
32085     ipath="$windows_path"
32086   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32087     windows_path=`cmd //c echo $unix_path`
32088     ipath="$windows_path"
32089   fi
32090 
32091       VS_INCLUDE="$VS_INCLUDE;$ipath"
32092     done
32093     # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
32094     # as LIB for compiler invocations without SYSROOT_LDFLAGS
32095     for i in $DEVKIT_VS_LIB; do
32096       libpath=$i
32097 
32098   unix_path="$libpath"
32099   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32100     windows_path=`$CYGPATH -m "$unix_path"`
32101     libpath="$windows_path"
32102   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32103     windows_path=`cmd //c echo $unix_path`
32104     libpath="$windows_path"
32105   fi
32106 
32107       VS_LIB="$VS_LIB;$libpath"
32108     done
32109     IFS="$OLDIFS"
32110 
32111     { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
32112 $as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
32113 
32114   elif test "x$with_toolchain_version" != x; then
32115     # User override; check that it is valid
32116     if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
32117       { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
32118 $as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
32119       { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
32120 $as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
32121       as_fn_error $? "Cannot continue." "$LINENO" 5
32122     fi
32123     VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
32124   else
32125     # No flag given, use default
32126     VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
32127   fi
32128 
32129   for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
32130 
32131   VS_VERSION="$VS_VERSION"
32132   eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
32133   eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
32134   eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
32135   eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
32136 
32137   # When using --with-tools-dir, assume it points to the correct and default
32138   # version of Visual Studio or that --with-toolchain-version was also set.
32139   if test "x$with_tools_dir" != x; then
32140 
32141   if test "x$VS_ENV_CMD" = x; then
32142     VS_VERSION="${VS_VERSION}"
32143     VS_BASE="$with_tools_dir/../.."
32144     METHOD="--with-tools-dir"
32145 
32146     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32147       VCVARSFILE="vc/bin/vcvars32.bat"
32148     else
32149       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32150     fi
32151 
32152 
32153   windows_path="$VS_BASE"
32154   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32155     unix_path=`$CYGPATH -u "$windows_path"`
32156     VS_BASE="$unix_path"
32157   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32158     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32159     VS_BASE="$unix_path"
32160   fi
32161 
32162     if test -d "$VS_BASE"; then
32163       if test -f "$VS_BASE/$VCVARSFILE"; then
32164         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32165 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32166         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32167         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32168         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32169         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32170       else
32171         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32172 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32173         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32174 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32175       fi
32176     fi
32177   fi
32178 
32179 
32180   if test "x$VS_ENV_CMD" = x; then
32181     VS_VERSION="${VS_VERSION}"
32182     VS_BASE="$with_tools_dir/../../.."
32183     METHOD="--with-tools-dir"
32184 
32185     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32186       VCVARSFILE="vc/bin/vcvars32.bat"
32187     else
32188       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32189     fi
32190 
32191 
32192   windows_path="$VS_BASE"
32193   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32194     unix_path=`$CYGPATH -u "$windows_path"`
32195     VS_BASE="$unix_path"
32196   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32197     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32198     VS_BASE="$unix_path"
32199   fi
32200 
32201     if test -d "$VS_BASE"; then
32202       if test -f "$VS_BASE/$VCVARSFILE"; then
32203         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32204 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32205         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32206         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32207         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32208         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32209       else
32210         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32211 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32212         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32213 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32214       fi
32215     fi
32216   fi
32217 
32218     if test "x$VS_ENV_CMD" = x; then
32219       # Having specified an argument which is incorrect will produce an instant failure;
32220       # we should not go on looking
32221       { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
32222 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
32223       { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
32224 $as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
32225       { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
32226 $as_echo "$as_me: directory within the Visual Studio installation" >&6;}
32227       as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
32228     fi
32229   fi
32230 
32231   VS_ENV_CMD=""
32232   VS_ENV_ARGS=""
32233 
32234   if test "x$VS_COMNTOOLS" != x; then
32235 
32236   if test "x$VS_ENV_CMD" = x; then
32237     VS_VERSION="${VS_VERSION}"
32238     VS_BASE="$VS_COMNTOOLS/../.."
32239     METHOD="$VS_COMNTOOLS_VAR variable"
32240 
32241     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32242       VCVARSFILE="vc/bin/vcvars32.bat"
32243     else
32244       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32245     fi
32246 
32247 
32248   windows_path="$VS_BASE"
32249   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32250     unix_path=`$CYGPATH -u "$windows_path"`
32251     VS_BASE="$unix_path"
32252   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32253     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32254     VS_BASE="$unix_path"
32255   fi
32256 
32257     if test -d "$VS_BASE"; then
32258       if test -f "$VS_BASE/$VCVARSFILE"; then
32259         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32260 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32261         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32262         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32263         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32264         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32265       else
32266         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32267 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32268         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32269 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32270       fi
32271     fi
32272   fi
32273 
32274   fi
32275   if test "x$PROGRAMFILES" != x; then
32276 
32277   if test "x$VS_ENV_CMD" = x; then
32278     VS_VERSION="${VS_VERSION}"
32279     VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
32280     METHOD="well-known name"
32281 
32282     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32283       VCVARSFILE="vc/bin/vcvars32.bat"
32284     else
32285       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32286     fi
32287 
32288 
32289   windows_path="$VS_BASE"
32290   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32291     unix_path=`$CYGPATH -u "$windows_path"`
32292     VS_BASE="$unix_path"
32293   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32294     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32295     VS_BASE="$unix_path"
32296   fi
32297 
32298     if test -d "$VS_BASE"; then
32299       if test -f "$VS_BASE/$VCVARSFILE"; then
32300         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32301 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32302         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32303         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32304         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32305         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32306       else
32307         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32308 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32309         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32310 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32311       fi
32312     fi
32313   fi
32314 
32315   fi
32316   # Work around the insanely named ProgramFiles(x86) env variable
32317   PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
32318   if test "x$PROGRAMFILES_X86" != x; then
32319 
32320   if test "x$VS_ENV_CMD" = x; then
32321     VS_VERSION="${VS_VERSION}"
32322     VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
32323     METHOD="well-known name"
32324 
32325     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32326       VCVARSFILE="vc/bin/vcvars32.bat"
32327     else
32328       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32329     fi
32330 
32331 
32332   windows_path="$VS_BASE"
32333   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32334     unix_path=`$CYGPATH -u "$windows_path"`
32335     VS_BASE="$unix_path"
32336   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32337     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32338     VS_BASE="$unix_path"
32339   fi
32340 
32341     if test -d "$VS_BASE"; then
32342       if test -f "$VS_BASE/$VCVARSFILE"; then
32343         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32344 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32345         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32346         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32347         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32348         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32349       else
32350         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32351 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32352         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32353 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32354       fi
32355     fi
32356   fi
32357 
32358   fi
32359 
32360   if test "x$VS_ENV_CMD" = x; then
32361     VS_VERSION="${VS_VERSION}"
32362     VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
32363     METHOD="well-known name"
32364 
32365     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32366       VCVARSFILE="vc/bin/vcvars32.bat"
32367     else
32368       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32369     fi
32370 
32371 
32372   windows_path="$VS_BASE"
32373   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32374     unix_path=`$CYGPATH -u "$windows_path"`
32375     VS_BASE="$unix_path"
32376   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32377     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32378     VS_BASE="$unix_path"
32379   fi
32380 
32381     if test -d "$VS_BASE"; then
32382       if test -f "$VS_BASE/$VCVARSFILE"; then
32383         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32384 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32385         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32386         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32387         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32388         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32389       else
32390         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32391 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32392         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32393 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32394       fi
32395     fi
32396   fi
32397 
32398 
32399   if test "x$VS_ENV_CMD" = x; then
32400     VS_VERSION="${VS_VERSION}"
32401     VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
32402     METHOD="well-known name"
32403 
32404     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32405       VCVARSFILE="vc/bin/vcvars32.bat"
32406     else
32407       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32408     fi
32409 
32410 
32411   windows_path="$VS_BASE"
32412   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32413     unix_path=`$CYGPATH -u "$windows_path"`
32414     VS_BASE="$unix_path"
32415   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32416     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32417     VS_BASE="$unix_path"
32418   fi
32419 
32420     if test -d "$VS_BASE"; then
32421       if test -f "$VS_BASE/$VCVARSFILE"; then
32422         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32423 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32424         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32425         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32426         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32427         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32428       else
32429         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32430 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32431         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32432 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32433       fi
32434     fi
32435   fi
32436 
32437 
32438   if test "x$SDK_INSTALL_DIR" != x; then
32439     if test "x$ProgramW6432" != x; then
32440 
32441   if test "x$VS_ENV_CMD" = x; then
32442     VS_VERSION="${VS_VERSION}"
32443     WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
32444     METHOD="well-known name"
32445 
32446   windows_path="$WIN_SDK_BASE"
32447   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32448     unix_path=`$CYGPATH -u "$windows_path"`
32449     WIN_SDK_BASE="$unix_path"
32450   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32451     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32452     WIN_SDK_BASE="$unix_path"
32453   fi
32454 
32455     if test -d "$WIN_SDK_BASE"; then
32456       # There have been cases of partial or broken SDK installations. A missing
32457       # lib dir is not going to work.
32458       if test ! -d "$WIN_SDK_BASE/lib"; then
32459         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32460 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32461         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32462 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32463       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32464         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32465 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32466         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32467         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32468           VS_ENV_ARGS="/x86"
32469         else
32470           VS_ENV_ARGS="/x64"
32471         fi
32472         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32473         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32474         # TODO: improve detection for other versions of SDK
32475         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32476       else
32477         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32478 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32479         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32480 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32481       fi
32482     fi
32483   fi
32484 
32485     fi
32486     if test "x$PROGRAMW6432" != x; then
32487 
32488   if test "x$VS_ENV_CMD" = x; then
32489     VS_VERSION="${VS_VERSION}"
32490     WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32491     METHOD="well-known name"
32492 
32493   windows_path="$WIN_SDK_BASE"
32494   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32495     unix_path=`$CYGPATH -u "$windows_path"`
32496     WIN_SDK_BASE="$unix_path"
32497   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32498     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32499     WIN_SDK_BASE="$unix_path"
32500   fi
32501 
32502     if test -d "$WIN_SDK_BASE"; then
32503       # There have been cases of partial or broken SDK installations. A missing
32504       # lib dir is not going to work.
32505       if test ! -d "$WIN_SDK_BASE/lib"; then
32506         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32507 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32508         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32509 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32510       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32511         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32512 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32513         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32514         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32515           VS_ENV_ARGS="/x86"
32516         else
32517           VS_ENV_ARGS="/x64"
32518         fi
32519         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32520         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32521         # TODO: improve detection for other versions of SDK
32522         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32523       else
32524         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32525 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32526         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32527 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32528       fi
32529     fi
32530   fi
32531 
32532     fi
32533     if test "x$PROGRAMFILES" != x; then
32534 
32535   if test "x$VS_ENV_CMD" = x; then
32536     VS_VERSION="${VS_VERSION}"
32537     WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32538     METHOD="well-known name"
32539 
32540   windows_path="$WIN_SDK_BASE"
32541   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32542     unix_path=`$CYGPATH -u "$windows_path"`
32543     WIN_SDK_BASE="$unix_path"
32544   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32545     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32546     WIN_SDK_BASE="$unix_path"
32547   fi
32548 
32549     if test -d "$WIN_SDK_BASE"; then
32550       # There have been cases of partial or broken SDK installations. A missing
32551       # lib dir is not going to work.
32552       if test ! -d "$WIN_SDK_BASE/lib"; then
32553         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32554 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32555         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32556 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32557       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32558         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32559 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32560         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32561         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32562           VS_ENV_ARGS="/x86"
32563         else
32564           VS_ENV_ARGS="/x64"
32565         fi
32566         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32567         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32568         # TODO: improve detection for other versions of SDK
32569         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32570       else
32571         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32572 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32573         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32574 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32575       fi
32576     fi
32577   fi
32578 
32579     fi
32580 
32581   if test "x$VS_ENV_CMD" = x; then
32582     VS_VERSION="${VS_VERSION}"
32583     WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32584     METHOD="well-known name"
32585 
32586   windows_path="$WIN_SDK_BASE"
32587   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32588     unix_path=`$CYGPATH -u "$windows_path"`
32589     WIN_SDK_BASE="$unix_path"
32590   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32591     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32592     WIN_SDK_BASE="$unix_path"
32593   fi
32594 
32595     if test -d "$WIN_SDK_BASE"; then
32596       # There have been cases of partial or broken SDK installations. A missing
32597       # lib dir is not going to work.
32598       if test ! -d "$WIN_SDK_BASE/lib"; then
32599         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32600 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32601         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32602 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32603       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32604         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32605 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32606         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32607         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32608           VS_ENV_ARGS="/x86"
32609         else
32610           VS_ENV_ARGS="/x64"
32611         fi
32612         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32613         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32614         # TODO: improve detection for other versions of SDK
32615         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32616       else
32617         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32618 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32619         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32620 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32621       fi
32622     fi
32623   fi
32624 
32625 
32626   if test "x$VS_ENV_CMD" = x; then
32627     VS_VERSION="${VS_VERSION}"
32628     WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
32629     METHOD="well-known name"
32630 
32631   windows_path="$WIN_SDK_BASE"
32632   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32633     unix_path=`$CYGPATH -u "$windows_path"`
32634     WIN_SDK_BASE="$unix_path"
32635   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32636     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32637     WIN_SDK_BASE="$unix_path"
32638   fi
32639 
32640     if test -d "$WIN_SDK_BASE"; then
32641       # There have been cases of partial or broken SDK installations. A missing
32642       # lib dir is not going to work.
32643       if test ! -d "$WIN_SDK_BASE/lib"; then
32644         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32645 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32646         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32647 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32648       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32649         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32650 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32651         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32652         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32653           VS_ENV_ARGS="/x86"
32654         else
32655           VS_ENV_ARGS="/x64"
32656         fi
32657         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32658         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32659         # TODO: improve detection for other versions of SDK
32660         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32661       else
32662         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32663 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32664         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32665 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32666       fi
32667     fi
32668   fi
32669 
32670   fi
32671 
32672     if test "x$VS_ENV_CMD" != x; then
32673       TOOLCHAIN_VERSION=$VS_VERSION
32674       eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32675       eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32676       eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32677       eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32678       # The rest of the variables are already evaled while probing
32679       { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
32680 $as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
32681       break
32682     fi
32683   done
32684 
32685 
32686   # If we have a devkit, skip all of the below.
32687   if test "x$DEVKIT_VS_VERSION" = x; then
32688     if test "x$VS_ENV_CMD" != x; then
32689       # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
32690 
32691   # Only process if variable expands to non-empty
32692 
32693   if test "x$VS_ENV_CMD" != x; then
32694     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32695 
32696   # First separate the path from the arguments. This will split at the first
32697   # space.
32698   complete="$VS_ENV_CMD"
32699   path="${complete%% *}"
32700   tmp="$complete EOL"
32701   arguments="${tmp#* }"
32702 
32703   # Input might be given as Windows format, start by converting to
32704   # unix format.
32705   new_path=`$CYGPATH -u "$path"`
32706 
32707   # Now try to locate executable using which
32708   new_path=`$WHICH "$new_path" 2> /dev/null`
32709   # bat and cmd files are not always considered executable in cygwin causing which
32710   # to not find them
32711   if test "x$new_path" = x \
32712       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32713       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32714     new_path=`$CYGPATH -u "$path"`
32715   fi
32716   if test "x$new_path" = x; then
32717     # Oops. Which didn't find the executable.
32718     # The splitting of arguments from the executable at a space might have been incorrect,
32719     # since paths with space are more likely in Windows. Give it another try with the whole
32720     # argument.
32721     path="$complete"
32722     arguments="EOL"
32723     new_path=`$CYGPATH -u "$path"`
32724     new_path=`$WHICH "$new_path" 2> /dev/null`
32725     # bat and cmd files are not always considered executable in cygwin causing which
32726     # to not find them
32727     if test "x$new_path" = x \
32728         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32729         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32730       new_path=`$CYGPATH -u "$path"`
32731     fi
32732     if test "x$new_path" = x; then
32733       # It's still not found. Now this is an unrecoverable error.
32734       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32735 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32736       has_space=`$ECHO "$complete" | $GREP " "`
32737       if test "x$has_space" != x; then
32738         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32739 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32740       fi
32741       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32742     fi
32743   fi
32744 
32745   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32746   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32747   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32748   # "foo.exe" is OK but "foo" is an error.
32749   #
32750   # This test is therefore slightly more accurate than "test -f" to check for file presence.
32751   # It is also a way to make sure we got the proper file name for the real test later on.
32752   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32753   if test "x$test_shortpath" = x; then
32754     # Short path failed, file does not exist as specified.
32755     # Try adding .exe or .cmd
32756     if test -f "${new_path}.exe"; then
32757       input_to_shortpath="${new_path}.exe"
32758     elif test -f "${new_path}.cmd"; then
32759       input_to_shortpath="${new_path}.cmd"
32760     else
32761       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
32762 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
32763       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32764 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32765       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32766     fi
32767   else
32768     input_to_shortpath="$new_path"
32769   fi
32770 
32771   # Call helper function which possibly converts this using DOS-style short mode.
32772   # If so, the updated path is stored in $new_path.
32773   new_path="$input_to_shortpath"
32774 
32775   input_path="$input_to_shortpath"
32776   # Check if we need to convert this using DOS-style short mode. If the path
32777   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32778   # take no chances and rewrite it.
32779   # Note: m4 eats our [], so we need to use [ and ] instead.
32780   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32781   if test "x$has_forbidden_chars" != x; then
32782     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32783     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32784     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32785     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32786       # Going to short mode and back again did indeed matter. Since short mode is
32787       # case insensitive, let's make it lowercase to improve readability.
32788       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32789       # Now convert it back to Unix-style (cygpath)
32790       input_path=`$CYGPATH -u "$shortmode_path"`
32791       new_path="$input_path"
32792     fi
32793   fi
32794 
32795   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32796   if test "x$test_cygdrive_prefix" = x; then
32797     # As a simple fix, exclude /usr/bin since it's not a real path.
32798     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32799       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32800       # a path prefixed by /cygdrive for fixpath to work.
32801       new_path="$CYGWIN_ROOT_PATH$input_path"
32802     fi
32803   fi
32804 
32805   # remove trailing .exe if any
32806   new_path="${new_path/%.exe/}"
32807 
32808     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32809 
32810   # First separate the path from the arguments. This will split at the first
32811   # space.
32812   complete="$VS_ENV_CMD"
32813   path="${complete%% *}"
32814   tmp="$complete EOL"
32815   arguments="${tmp#* }"
32816 
32817   # Input might be given as Windows format, start by converting to
32818   # unix format.
32819   new_path="$path"
32820 
32821   windows_path="$new_path"
32822   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32823     unix_path=`$CYGPATH -u "$windows_path"`
32824     new_path="$unix_path"
32825   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32826     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32827     new_path="$unix_path"
32828   fi
32829 
32830 
32831   # Now try to locate executable using which
32832   new_path=`$WHICH "$new_path" 2> /dev/null`
32833 
32834   if test "x$new_path" = x; then
32835     # Oops. Which didn't find the executable.
32836     # The splitting of arguments from the executable at a space might have been incorrect,
32837     # since paths with space are more likely in Windows. Give it another try with the whole
32838     # argument.
32839     path="$complete"
32840     arguments="EOL"
32841     new_path="$path"
32842 
32843   windows_path="$new_path"
32844   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32845     unix_path=`$CYGPATH -u "$windows_path"`
32846     new_path="$unix_path"
32847   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32848     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32849     new_path="$unix_path"
32850   fi
32851 
32852 
32853     new_path=`$WHICH "$new_path" 2> /dev/null`
32854     # bat and cmd files are not always considered executable in MSYS causing which
32855     # to not find them
32856     if test "x$new_path" = x \
32857         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32858         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32859       new_path="$path"
32860 
32861   windows_path="$new_path"
32862   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32863     unix_path=`$CYGPATH -u "$windows_path"`
32864     new_path="$unix_path"
32865   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32866     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32867     new_path="$unix_path"
32868   fi
32869 
32870     fi
32871 
32872     if test "x$new_path" = x; then
32873       # It's still not found. Now this is an unrecoverable error.
32874       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32875 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32876       has_space=`$ECHO "$complete" | $GREP " "`
32877       if test "x$has_space" != x; then
32878         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32879 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32880       fi
32881       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32882     fi
32883   fi
32884 
32885   # Now new_path has a complete unix path to the binary
32886   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32887     # Keep paths in /bin as-is, but remove trailing .exe if any
32888     new_path="${new_path/%.exe/}"
32889     # Do not save /bin paths to all_fixpath_prefixes!
32890   else
32891     # Not in mixed or Windows style, start by that.
32892     new_path=`cmd //c echo $new_path`
32893 
32894   input_path="$new_path"
32895   # Check if we need to convert this using DOS-style short mode. If the path
32896   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32897   # take no chances and rewrite it.
32898   # Note: m4 eats our [], so we need to use [ and ] instead.
32899   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32900   if test "x$has_forbidden_chars" != x; then
32901     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32902     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32903   fi
32904 
32905     # Output is in $new_path
32906 
32907   windows_path="$new_path"
32908   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32909     unix_path=`$CYGPATH -u "$windows_path"`
32910     new_path="$unix_path"
32911   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32912     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32913     new_path="$unix_path"
32914   fi
32915 
32916     # remove trailing .exe if any
32917     new_path="${new_path/%.exe/}"
32918 
32919     # Save the first 10 bytes of this path to the storage, so fixpath can work.
32920     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32921   fi
32922 
32923     else
32924       # We're on a unix platform. Hooray! :)
32925       # First separate the path from the arguments. This will split at the first
32926       # space.
32927       complete="$VS_ENV_CMD"
32928       path="${complete%% *}"
32929       tmp="$complete EOL"
32930       arguments="${tmp#* }"
32931 
32932       # Cannot rely on the command "which" here since it doesn't always work.
32933       is_absolute_path=`$ECHO "$path" | $GREP ^/`
32934       if test -z "$is_absolute_path"; then
32935         # Path to executable is not absolute. Find it.
32936         IFS_save="$IFS"
32937         IFS=:
32938         for p in $PATH; do
32939           if test -f "$p/$path" && test -x "$p/$path"; then
32940             new_path="$p/$path"
32941             break
32942           fi
32943         done
32944         IFS="$IFS_save"
32945       else
32946         # This is an absolute path, we can use it without further modifications.
32947         new_path="$path"
32948       fi
32949 
32950       if test "x$new_path" = x; then
32951         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32952 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32953         has_space=`$ECHO "$complete" | $GREP " "`
32954         if test "x$has_space" != x; then
32955           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32956 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32957         fi
32958         as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32959       fi
32960     fi
32961 
32962     # Now join together the path and the arguments once again
32963     if test "x$arguments" != xEOL; then
32964       new_complete="$new_path ${arguments% *}"
32965     else
32966       new_complete="$new_path"
32967     fi
32968 
32969     if test "x$complete" != "x$new_complete"; then
32970       VS_ENV_CMD="$new_complete"
32971       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
32972 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
32973     fi
32974   fi
32975 
32976 
32977       # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
32978       { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
32979 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
32980 
32981       # We need to create a couple of temporary files.
32982       VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
32983       $MKDIR -p $VS_ENV_TMP_DIR
32984 
32985       # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
32986       # Instead create a shell script which will set the relevant variables when run.
32987       WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
32988 
32989   unix_path="$WINPATH_VS_ENV_CMD"
32990   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32991     windows_path=`$CYGPATH -m "$unix_path"`
32992     WINPATH_VS_ENV_CMD="$windows_path"
32993   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32994     windows_path=`cmd //c echo $unix_path`
32995     WINPATH_VS_ENV_CMD="$windows_path"
32996   fi
32997 
32998       WINPATH_BASH="$BASH"
32999 
33000   unix_path="$WINPATH_BASH"
33001   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33002     windows_path=`$CYGPATH -m "$unix_path"`
33003     WINPATH_BASH="$windows_path"
33004   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33005     windows_path=`cmd //c echo $unix_path`
33006     WINPATH_BASH="$windows_path"
33007   fi
33008 
33009 
33010       # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
33011       # script (executable by bash) that will setup the important variables.
33012       EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
33013       $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
33014       # This will end up something like:
33015       # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
33016       $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
33017       # These will end up something like:
33018       # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
33019       # The trailing space for everyone except PATH is no typo, but is needed due
33020       # to trailing \ in the Windows paths. These will be stripped later.
33021       $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
33022           >> $EXTRACT_VC_ENV_BAT_FILE
33023       $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
33024           >> $EXTRACT_VC_ENV_BAT_FILE
33025       $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
33026           >> $EXTRACT_VC_ENV_BAT_FILE
33027       $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
33028           >> $EXTRACT_VC_ENV_BAT_FILE
33029       $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
33030           >> $EXTRACT_VC_ENV_BAT_FILE
33031       $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
33032           >> $EXTRACT_VC_ENV_BAT_FILE
33033 
33034       # Now execute the newly created bat file.
33035       # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
33036       # Change directory so we don't need to mess with Windows paths in redirects.
33037       cd $VS_ENV_TMP_DIR
33038       cmd /c extract-vs-env.bat | $CAT
33039       cd $CURDIR
33040 
33041       if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
33042         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
33043 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
33044         { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
33045 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
33046         { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
33047 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33048         as_fn_error $? "Cannot continue" "$LINENO" 5
33049       fi
33050 
33051       # Now set all paths and other env variables. This will allow the rest of
33052       # the configure script to find and run the compiler in the proper way.
33053       { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
33054 $as_echo "$as_me: Setting extracted environment variables" >&6;}
33055       . $VS_ENV_TMP_DIR/set-vs-env.sh
33056       # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
33057       # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
33058     else
33059       # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
33060       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
33061 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
33062     fi
33063   fi
33064 
33065   # At this point, we should have correct variables in the environment, or we can't continue.
33066   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
33067 $as_echo_n "checking for Visual Studio variables... " >&6; }
33068 
33069   if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
33070       || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
33071     if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
33072       { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
33073 $as_echo "present but broken" >&6; }
33074       as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
33075     else
33076       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
33077 $as_echo "ok" >&6; }
33078       # Remove any trailing "\" ";" and " " from the variables.
33079       VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
33080       VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
33081       VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
33082       WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
33083       WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
33084       # Remove any paths containing # (typically F#) as that messes up make. This
33085       # is needed if visual studio was installed with F# support.
33086       VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
33087 
33088 
33089 
33090 
33091 
33092       # Convert VS_INCLUDE into SYSROOT_CFLAGS
33093       OLDIFS="$IFS"
33094       IFS=";"
33095       for i in $VS_INCLUDE; do
33096         ipath=$i
33097         # Only process non-empty elements
33098         if test "x$ipath" != x; then
33099           IFS="$OLDIFS"
33100           # Check that directory exists before calling fixup_path
33101           testpath=$ipath
33102 
33103   windows_path="$testpath"
33104   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33105     unix_path=`$CYGPATH -u "$windows_path"`
33106     testpath="$unix_path"
33107   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33108     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33109     testpath="$unix_path"
33110   fi
33111 
33112           if test -d "$testpath"; then
33113 
33114   # Only process if variable expands to non-empty
33115 
33116   if test "x$ipath" != x; then
33117     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33118 
33119   # Input might be given as Windows format, start by converting to
33120   # unix format.
33121   path="$ipath"
33122   new_path=`$CYGPATH -u "$path"`
33123 
33124   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33125   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33126   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33127   # "foo.exe" is OK but "foo" is an error.
33128   #
33129   # This test is therefore slightly more accurate than "test -f" to check for file precense.
33130   # It is also a way to make sure we got the proper file name for the real test later on.
33131   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33132   if test "x$test_shortpath" = x; then
33133     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
33134 $as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
33135     as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
33136   fi
33137 
33138   # Call helper function which possibly converts this using DOS-style short mode.
33139   # If so, the updated path is stored in $new_path.
33140 
33141   input_path="$new_path"
33142   # Check if we need to convert this using DOS-style short mode. If the path
33143   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33144   # take no chances and rewrite it.
33145   # Note: m4 eats our [], so we need to use [ and ] instead.
33146   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33147   if test "x$has_forbidden_chars" != x; then
33148     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33149     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33150     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33151     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33152       # Going to short mode and back again did indeed matter. Since short mode is
33153       # case insensitive, let's make it lowercase to improve readability.
33154       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33155       # Now convert it back to Unix-style (cygpath)
33156       input_path=`$CYGPATH -u "$shortmode_path"`
33157       new_path="$input_path"
33158     fi
33159   fi
33160 
33161   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33162   if test "x$test_cygdrive_prefix" = x; then
33163     # As a simple fix, exclude /usr/bin since it's not a real path.
33164     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33165       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33166       # a path prefixed by /cygdrive for fixpath to work.
33167       new_path="$CYGWIN_ROOT_PATH$input_path"
33168     fi
33169   fi
33170 
33171 
33172   if test "x$path" != "x$new_path"; then
33173     ipath="$new_path"
33174     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
33175 $as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
33176   fi
33177 
33178     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33179 
33180   path="$ipath"
33181   has_colon=`$ECHO $path | $GREP ^.:`
33182   new_path="$path"
33183   if test "x$has_colon" = x; then
33184     # Not in mixed or Windows style, start by that.
33185     new_path=`cmd //c echo $path`
33186   fi
33187 
33188 
33189   input_path="$new_path"
33190   # Check if we need to convert this using DOS-style short mode. If the path
33191   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33192   # take no chances and rewrite it.
33193   # Note: m4 eats our [], so we need to use [ and ] instead.
33194   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33195   if test "x$has_forbidden_chars" != x; then
33196     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33197     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33198   fi
33199 
33200 
33201   windows_path="$new_path"
33202   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33203     unix_path=`$CYGPATH -u "$windows_path"`
33204     new_path="$unix_path"
33205   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33206     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33207     new_path="$unix_path"
33208   fi
33209 
33210   if test "x$path" != "x$new_path"; then
33211     ipath="$new_path"
33212     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
33213 $as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
33214   fi
33215 
33216   # Save the first 10 bytes of this path to the storage, so fixpath can work.
33217   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33218 
33219     else
33220       # We're on a unix platform. Hooray! :)
33221       path="$ipath"
33222       has_space=`$ECHO "$path" | $GREP " "`
33223       if test "x$has_space" != x; then
33224         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
33225 $as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
33226         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33227       fi
33228 
33229       # Use eval to expand a potential ~
33230       eval path="$path"
33231       if test ! -f "$path" && test ! -d "$path"; then
33232         as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
33233       fi
33234 
33235       if test -d "$path"; then
33236         ipath="`cd "$path"; $THEPWDCMD -L`"
33237       else
33238         dir="`$DIRNAME "$path"`"
33239         base="`$BASENAME "$path"`"
33240         ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
33241       fi
33242     fi
33243   fi
33244 
33245             SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
33246           fi
33247           IFS=";"
33248         fi
33249       done
33250       # Convert VS_LIB into SYSROOT_LDFLAGS
33251       for i in $VS_LIB; do
33252         libpath=$i
33253         # Only process non-empty elements
33254         if test "x$libpath" != x; then
33255           IFS="$OLDIFS"
33256           # Check that directory exists before calling fixup_path
33257           testpath=$libpath
33258 
33259   windows_path="$testpath"
33260   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33261     unix_path=`$CYGPATH -u "$windows_path"`
33262     testpath="$unix_path"
33263   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33264     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33265     testpath="$unix_path"
33266   fi
33267 
33268           if test -d "$testpath"; then
33269 
33270   # Only process if variable expands to non-empty
33271 
33272   if test "x$libpath" != x; then
33273     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33274 
33275   # Input might be given as Windows format, start by converting to
33276   # unix format.
33277   path="$libpath"
33278   new_path=`$CYGPATH -u "$path"`
33279 
33280   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33281   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33282   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33283   # "foo.exe" is OK but "foo" is an error.
33284   #
33285   # This test is therefore slightly more accurate than "test -f" to check for file precense.
33286   # It is also a way to make sure we got the proper file name for the real test later on.
33287   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33288   if test "x$test_shortpath" = x; then
33289     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
33290 $as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
33291     as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
33292   fi
33293 
33294   # Call helper function which possibly converts this using DOS-style short mode.
33295   # If so, the updated path is stored in $new_path.
33296 
33297   input_path="$new_path"
33298   # Check if we need to convert this using DOS-style short mode. If the path
33299   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33300   # take no chances and rewrite it.
33301   # Note: m4 eats our [], so we need to use [ and ] instead.
33302   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33303   if test "x$has_forbidden_chars" != x; then
33304     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33305     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33306     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33307     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33308       # Going to short mode and back again did indeed matter. Since short mode is
33309       # case insensitive, let's make it lowercase to improve readability.
33310       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33311       # Now convert it back to Unix-style (cygpath)
33312       input_path=`$CYGPATH -u "$shortmode_path"`
33313       new_path="$input_path"
33314     fi
33315   fi
33316 
33317   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33318   if test "x$test_cygdrive_prefix" = x; then
33319     # As a simple fix, exclude /usr/bin since it's not a real path.
33320     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33321       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33322       # a path prefixed by /cygdrive for fixpath to work.
33323       new_path="$CYGWIN_ROOT_PATH$input_path"
33324     fi
33325   fi
33326 
33327 
33328   if test "x$path" != "x$new_path"; then
33329     libpath="$new_path"
33330     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
33331 $as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
33332   fi
33333 
33334     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33335 
33336   path="$libpath"
33337   has_colon=`$ECHO $path | $GREP ^.:`
33338   new_path="$path"
33339   if test "x$has_colon" = x; then
33340     # Not in mixed or Windows style, start by that.
33341     new_path=`cmd //c echo $path`
33342   fi
33343 
33344 
33345   input_path="$new_path"
33346   # Check if we need to convert this using DOS-style short mode. If the path
33347   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33348   # take no chances and rewrite it.
33349   # Note: m4 eats our [], so we need to use [ and ] instead.
33350   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33351   if test "x$has_forbidden_chars" != x; then
33352     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33353     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33354   fi
33355 
33356 
33357   windows_path="$new_path"
33358   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33359     unix_path=`$CYGPATH -u "$windows_path"`
33360     new_path="$unix_path"
33361   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33362     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33363     new_path="$unix_path"
33364   fi
33365 
33366   if test "x$path" != "x$new_path"; then
33367     libpath="$new_path"
33368     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
33369 $as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
33370   fi
33371 
33372   # Save the first 10 bytes of this path to the storage, so fixpath can work.
33373   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33374 
33375     else
33376       # We're on a unix platform. Hooray! :)
33377       path="$libpath"
33378       has_space=`$ECHO "$path" | $GREP " "`
33379       if test "x$has_space" != x; then
33380         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
33381 $as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
33382         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33383       fi
33384 
33385       # Use eval to expand a potential ~
33386       eval path="$path"
33387       if test ! -f "$path" && test ! -d "$path"; then
33388         as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
33389       fi
33390 
33391       if test -d "$path"; then
33392         libpath="`cd "$path"; $THEPWDCMD -L`"
33393       else
33394         dir="`$DIRNAME "$path"`"
33395         base="`$BASENAME "$path"`"
33396         libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
33397       fi
33398     fi
33399   fi
33400 
33401             SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
33402           fi
33403           IFS=";"
33404         fi
33405       done
33406       IFS="$OLDIFS"
33407     fi
33408   else
33409     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33410 $as_echo "not found" >&6; }
33411 
33412     if test "x$VS_ENV_CMD" = x; then
33413       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
33414 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
33415       { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
33416 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
33417     else
33418       { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
33419 $as_echo "$as_me: Running the extraction script failed." >&6;}
33420     fi
33421     { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
33422 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
33423     { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
33424 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33425     as_fn_error $? "Cannot continue" "$LINENO" 5
33426   fi
33427 
33428     # Reset path to VS_PATH. It will include everything that was on PATH at the time we
33429     # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
33430     PATH="$VS_PATH"
33431     # The microsoft toolchain also requires INCLUDE and LIB to be set.
33432     export INCLUDE="$VS_INCLUDE"
33433     export LIB="$VS_LIB"
33434   else
33435     if test "x$XCODE_VERSION_OUTPUT" != x; then
33436       # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
33437       TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
33438       TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
33439     else
33440       # Currently we do not define this for other toolchains. This might change as the need arise.
33441       TOOLCHAIN_VERSION=
33442     fi
33443   fi
33444 
33445 
33446   # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
33447   # override all other locations.
33448   if test "x$TOOLCHAIN_PATH" != x; then
33449     PATH=$TOOLCHAIN_PATH:$PATH
33450   fi
33451 
33452 
33453   #
33454   # Setup the compilers (CC and CXX)
33455   #
33456 
33457   COMPILER_NAME=C
33458   SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
33459 
33460   if test "x$CC" != x; then
33461     # User has supplied compiler name already, always let that override.
33462     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
33463 $as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
33464     if test "x`basename $CC`" = "x$CC"; then
33465       # A command without a complete path is provided, search $PATH.
33466 
33467       for ac_prog in $CC
33468 do
33469   # Extract the first word of "$ac_prog", so it can be a program name with args.
33470 set dummy $ac_prog; ac_word=$2
33471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33472 $as_echo_n "checking for $ac_word... " >&6; }
33473 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33474   $as_echo_n "(cached) " >&6
33475 else
33476   case $POTENTIAL_CC in
33477   [\\/]* | ?:[\\/]*)
33478   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33479   ;;
33480   *)
33481   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33482 for as_dir in $PATH
33483 do
33484   IFS=$as_save_IFS
33485   test -z "$as_dir" && as_dir=.
33486     for ac_exec_ext in '' $ac_executable_extensions; do
33487   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33488     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33489     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33490     break 2
33491   fi
33492 done
33493   done
33494 IFS=$as_save_IFS
33495 
33496   ;;
33497 esac
33498 fi
33499 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33500 if test -n "$POTENTIAL_CC"; then
33501   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33502 $as_echo "$POTENTIAL_CC" >&6; }
33503 else
33504   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33505 $as_echo "no" >&6; }
33506 fi
33507 
33508 
33509   test -n "$POTENTIAL_CC" && break
33510 done
33511 
33512       if test "x$POTENTIAL_CC" != x; then
33513         CC=$POTENTIAL_CC
33514       else
33515         as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33516       fi
33517     else
33518       # Otherwise it might already be a complete path
33519       if test ! -x "$CC"; then
33520         as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33521       fi
33522     fi
33523   else
33524     # No user supplied value. Locate compiler ourselves.
33525 
33526     # If we are cross compiling, assume cross compilation tools follows the
33527     # cross compilation standard where they are prefixed with the autoconf
33528     # standard name for the target. For example the binary
33529     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33530     # If we are not cross compiling, then the default compiler name will be
33531     # used.
33532 
33533     CC=
33534     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33535     # before checking the rest of the PATH.
33536     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33537     # step, this should not be necessary.
33538     if test -n "$TOOLCHAIN_PATH"; then
33539       PATH_save="$PATH"
33540       PATH="$TOOLCHAIN_PATH"
33541       if test -n "$ac_tool_prefix"; then
33542   # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
33543 set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
33544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33545 $as_echo_n "checking for $ac_word... " >&6; }
33546 if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33547   $as_echo_n "(cached) " >&6
33548 else
33549   case $TOOLCHAIN_PATH_CC in
33550   [\\/]* | ?:[\\/]*)
33551   ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33552   ;;
33553   *)
33554   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33555 for as_dir in $PATH
33556 do
33557   IFS=$as_save_IFS
33558   test -z "$as_dir" && as_dir=.
33559     for ac_exec_ext in '' $ac_executable_extensions; do
33560   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33561     ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33562     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33563     break 2
33564   fi
33565 done
33566   done
33567 IFS=$as_save_IFS
33568 
33569   ;;
33570 esac
33571 fi
33572 TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33573 if test -n "$TOOLCHAIN_PATH_CC"; then
33574   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33575 $as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33576 else
33577   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33578 $as_echo "no" >&6; }
33579 fi
33580 
33581 
33582 fi
33583 if test -z "$ac_cv_path_TOOLCHAIN_PATH_CC"; then
33584   ac_pt_TOOLCHAIN_PATH_CC=$TOOLCHAIN_PATH_CC
33585   # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
33586 set dummy $SEARCH_LIST; ac_word=$2
33587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33588 $as_echo_n "checking for $ac_word... " >&6; }
33589 if ${ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC+:} false; then :
33590   $as_echo_n "(cached) " >&6
33591 else
33592   case $ac_pt_TOOLCHAIN_PATH_CC in
33593   [\\/]* | ?:[\\/]*)
33594   ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC="$ac_pt_TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33595   ;;
33596   *)
33597   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33598 for as_dir in $PATH
33599 do
33600   IFS=$as_save_IFS
33601   test -z "$as_dir" && as_dir=.
33602     for ac_exec_ext in '' $ac_executable_extensions; do
33603   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33604     ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33605     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33606     break 2
33607   fi
33608 done
33609   done
33610 IFS=$as_save_IFS
33611 
33612   ;;
33613 esac
33614 fi
33615 ac_pt_TOOLCHAIN_PATH_CC=$ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC
33616 if test -n "$ac_pt_TOOLCHAIN_PATH_CC"; then
33617   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_TOOLCHAIN_PATH_CC" >&5
33618 $as_echo "$ac_pt_TOOLCHAIN_PATH_CC" >&6; }
33619 else
33620   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33621 $as_echo "no" >&6; }
33622 fi
33623 
33624   if test "x$ac_pt_TOOLCHAIN_PATH_CC" = x; then
33625     TOOLCHAIN_PATH_CC=""
33626   else
33627     case $cross_compiling:$ac_tool_warned in
33628 yes:)
33629 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33630 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33631 ac_tool_warned=yes ;;
33632 esac
33633     TOOLCHAIN_PATH_CC=$ac_pt_TOOLCHAIN_PATH_CC
33634   fi
33635 else
33636   TOOLCHAIN_PATH_CC="$ac_cv_path_TOOLCHAIN_PATH_CC"
33637 fi
33638 
33639       CC=$TOOLCHAIN_PATH_CC
33640       PATH="$PATH_save"
33641     fi
33642 
33643     # AC_PATH_TOOL can't be run multiple times with the same variable,
33644     # so create a new name for this run.
33645     if test "x$CC" = x; then
33646       if test -n "$ac_tool_prefix"; then
33647   # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
33648 set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
33649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33650 $as_echo_n "checking for $ac_word... " >&6; }
33651 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33652   $as_echo_n "(cached) " >&6
33653 else
33654   case $POTENTIAL_CC in
33655   [\\/]* | ?:[\\/]*)
33656   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33657   ;;
33658   *)
33659   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33660 for as_dir in $PATH
33661 do
33662   IFS=$as_save_IFS
33663   test -z "$as_dir" && as_dir=.
33664     for ac_exec_ext in '' $ac_executable_extensions; do
33665   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33666     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33667     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33668     break 2
33669   fi
33670 done
33671   done
33672 IFS=$as_save_IFS
33673 
33674   ;;
33675 esac
33676 fi
33677 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33678 if test -n "$POTENTIAL_CC"; then
33679   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33680 $as_echo "$POTENTIAL_CC" >&6; }
33681 else
33682   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33683 $as_echo "no" >&6; }
33684 fi
33685 
33686 
33687 fi
33688 if test -z "$ac_cv_path_POTENTIAL_CC"; then
33689   ac_pt_POTENTIAL_CC=$POTENTIAL_CC
33690   # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
33691 set dummy $SEARCH_LIST; ac_word=$2
33692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33693 $as_echo_n "checking for $ac_word... " >&6; }
33694 if ${ac_cv_path_ac_pt_POTENTIAL_CC+:} false; then :
33695   $as_echo_n "(cached) " >&6
33696 else
33697   case $ac_pt_POTENTIAL_CC in
33698   [\\/]* | ?:[\\/]*)
33699   ac_cv_path_ac_pt_POTENTIAL_CC="$ac_pt_POTENTIAL_CC" # Let the user override the test with a path.
33700   ;;
33701   *)
33702   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33703 for as_dir in $PATH
33704 do
33705   IFS=$as_save_IFS
33706   test -z "$as_dir" && as_dir=.
33707     for ac_exec_ext in '' $ac_executable_extensions; do
33708   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33709     ac_cv_path_ac_pt_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33710     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33711     break 2
33712   fi
33713 done
33714   done
33715 IFS=$as_save_IFS
33716 
33717   ;;
33718 esac
33719 fi
33720 ac_pt_POTENTIAL_CC=$ac_cv_path_ac_pt_POTENTIAL_CC
33721 if test -n "$ac_pt_POTENTIAL_CC"; then
33722   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_POTENTIAL_CC" >&5
33723 $as_echo "$ac_pt_POTENTIAL_CC" >&6; }
33724 else
33725   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33726 $as_echo "no" >&6; }
33727 fi
33728 
33729   if test "x$ac_pt_POTENTIAL_CC" = x; then
33730     POTENTIAL_CC=""
33731   else
33732     case $cross_compiling:$ac_tool_warned in
33733 yes:)
33734 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33735 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33736 ac_tool_warned=yes ;;
33737 esac
33738     POTENTIAL_CC=$ac_pt_POTENTIAL_CC
33739   fi
33740 else
33741   POTENTIAL_CC="$ac_cv_path_POTENTIAL_CC"
33742 fi
33743 
33744       CC=$POTENTIAL_CC
33745     fi
33746 
33747     if test "x$CC" = x; then
33748 
33749   # Print a helpful message on how to acquire the necessary build dependency.
33750   # devkit is the help tag: freetype, cups, alsa etc
33751   MISSING_DEPENDENCY=devkit
33752 
33753   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33754     cygwin_help $MISSING_DEPENDENCY
33755   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33756     msys_help $MISSING_DEPENDENCY
33757   else
33758     PKGHANDLER_COMMAND=
33759 
33760     case $PKGHANDLER in
33761       apt-get)
33762         apt_help     $MISSING_DEPENDENCY ;;
33763       yum)
33764         yum_help     $MISSING_DEPENDENCY ;;
33765       brew)
33766         brew_help    $MISSING_DEPENDENCY ;;
33767       port)
33768         port_help    $MISSING_DEPENDENCY ;;
33769       pkgutil)
33770         pkgutil_help $MISSING_DEPENDENCY ;;
33771       pkgadd)
33772         pkgadd_help  $MISSING_DEPENDENCY ;;
33773     esac
33774 
33775     if test "x$PKGHANDLER_COMMAND" != x; then
33776       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33777     fi
33778   fi
33779 
33780       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33781     fi
33782   fi
33783 
33784   # Now we have a compiler binary in CC. Make sure it's okay.
33785 
33786   # Only process if variable expands to non-empty
33787 
33788   if test "x$CC" != x; then
33789     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33790 
33791   # First separate the path from the arguments. This will split at the first
33792   # space.
33793   complete="$CC"
33794   path="${complete%% *}"
33795   tmp="$complete EOL"
33796   arguments="${tmp#* }"
33797 
33798   # Input might be given as Windows format, start by converting to
33799   # unix format.
33800   new_path=`$CYGPATH -u "$path"`
33801 
33802   # Now try to locate executable using which
33803   new_path=`$WHICH "$new_path" 2> /dev/null`
33804   # bat and cmd files are not always considered executable in cygwin causing which
33805   # to not find them
33806   if test "x$new_path" = x \
33807       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33808       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33809     new_path=`$CYGPATH -u "$path"`
33810   fi
33811   if test "x$new_path" = x; then
33812     # Oops. Which didn't find the executable.
33813     # The splitting of arguments from the executable at a space might have been incorrect,
33814     # since paths with space are more likely in Windows. Give it another try with the whole
33815     # argument.
33816     path="$complete"
33817     arguments="EOL"
33818     new_path=`$CYGPATH -u "$path"`
33819     new_path=`$WHICH "$new_path" 2> /dev/null`
33820     # bat and cmd files are not always considered executable in cygwin causing which
33821     # to not find them
33822     if test "x$new_path" = x \
33823         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33824         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33825       new_path=`$CYGPATH -u "$path"`
33826     fi
33827     if test "x$new_path" = x; then
33828       # It's still not found. Now this is an unrecoverable error.
33829       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33830 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33831       has_space=`$ECHO "$complete" | $GREP " "`
33832       if test "x$has_space" != x; then
33833         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33834 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33835       fi
33836       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33837     fi
33838   fi
33839 
33840   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33841   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33842   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33843   # "foo.exe" is OK but "foo" is an error.
33844   #
33845   # This test is therefore slightly more accurate than "test -f" to check for file presence.
33846   # It is also a way to make sure we got the proper file name for the real test later on.
33847   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33848   if test "x$test_shortpath" = x; then
33849     # Short path failed, file does not exist as specified.
33850     # Try adding .exe or .cmd
33851     if test -f "${new_path}.exe"; then
33852       input_to_shortpath="${new_path}.exe"
33853     elif test -f "${new_path}.cmd"; then
33854       input_to_shortpath="${new_path}.cmd"
33855     else
33856       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
33857 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
33858       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33859 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33860       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33861     fi
33862   else
33863     input_to_shortpath="$new_path"
33864   fi
33865 
33866   # Call helper function which possibly converts this using DOS-style short mode.
33867   # If so, the updated path is stored in $new_path.
33868   new_path="$input_to_shortpath"
33869 
33870   input_path="$input_to_shortpath"
33871   # Check if we need to convert this using DOS-style short mode. If the path
33872   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33873   # take no chances and rewrite it.
33874   # Note: m4 eats our [], so we need to use [ and ] instead.
33875   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33876   if test "x$has_forbidden_chars" != x; then
33877     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33878     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33879     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33880     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33881       # Going to short mode and back again did indeed matter. Since short mode is
33882       # case insensitive, let's make it lowercase to improve readability.
33883       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33884       # Now convert it back to Unix-style (cygpath)
33885       input_path=`$CYGPATH -u "$shortmode_path"`
33886       new_path="$input_path"
33887     fi
33888   fi
33889 
33890   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33891   if test "x$test_cygdrive_prefix" = x; then
33892     # As a simple fix, exclude /usr/bin since it's not a real path.
33893     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33894       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33895       # a path prefixed by /cygdrive for fixpath to work.
33896       new_path="$CYGWIN_ROOT_PATH$input_path"
33897     fi
33898   fi
33899 
33900   # remove trailing .exe if any
33901   new_path="${new_path/%.exe/}"
33902 
33903     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33904 
33905   # First separate the path from the arguments. This will split at the first
33906   # space.
33907   complete="$CC"
33908   path="${complete%% *}"
33909   tmp="$complete EOL"
33910   arguments="${tmp#* }"
33911 
33912   # Input might be given as Windows format, start by converting to
33913   # unix format.
33914   new_path="$path"
33915 
33916   windows_path="$new_path"
33917   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33918     unix_path=`$CYGPATH -u "$windows_path"`
33919     new_path="$unix_path"
33920   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33921     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33922     new_path="$unix_path"
33923   fi
33924 
33925 
33926   # Now try to locate executable using which
33927   new_path=`$WHICH "$new_path" 2> /dev/null`
33928 
33929   if test "x$new_path" = x; then
33930     # Oops. Which didn't find the executable.
33931     # The splitting of arguments from the executable at a space might have been incorrect,
33932     # since paths with space are more likely in Windows. Give it another try with the whole
33933     # argument.
33934     path="$complete"
33935     arguments="EOL"
33936     new_path="$path"
33937 
33938   windows_path="$new_path"
33939   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33940     unix_path=`$CYGPATH -u "$windows_path"`
33941     new_path="$unix_path"
33942   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33943     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33944     new_path="$unix_path"
33945   fi
33946 
33947 
33948     new_path=`$WHICH "$new_path" 2> /dev/null`
33949     # bat and cmd files are not always considered executable in MSYS causing which
33950     # to not find them
33951     if test "x$new_path" = x \
33952         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33953         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33954       new_path="$path"
33955 
33956   windows_path="$new_path"
33957   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33958     unix_path=`$CYGPATH -u "$windows_path"`
33959     new_path="$unix_path"
33960   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33961     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33962     new_path="$unix_path"
33963   fi
33964 
33965     fi
33966 
33967     if test "x$new_path" = x; then
33968       # It's still not found. Now this is an unrecoverable error.
33969       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33970 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33971       has_space=`$ECHO "$complete" | $GREP " "`
33972       if test "x$has_space" != x; then
33973         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33974 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33975       fi
33976       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33977     fi
33978   fi
33979 
33980   # Now new_path has a complete unix path to the binary
33981   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33982     # Keep paths in /bin as-is, but remove trailing .exe if any
33983     new_path="${new_path/%.exe/}"
33984     # Do not save /bin paths to all_fixpath_prefixes!
33985   else
33986     # Not in mixed or Windows style, start by that.
33987     new_path=`cmd //c echo $new_path`
33988 
33989   input_path="$new_path"
33990   # Check if we need to convert this using DOS-style short mode. If the path
33991   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33992   # take no chances and rewrite it.
33993   # Note: m4 eats our [], so we need to use [ and ] instead.
33994   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33995   if test "x$has_forbidden_chars" != x; then
33996     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33997     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33998   fi
33999 
34000     # Output is in $new_path
34001 
34002   windows_path="$new_path"
34003   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34004     unix_path=`$CYGPATH -u "$windows_path"`
34005     new_path="$unix_path"
34006   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34007     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34008     new_path="$unix_path"
34009   fi
34010 
34011     # remove trailing .exe if any
34012     new_path="${new_path/%.exe/}"
34013 
34014     # Save the first 10 bytes of this path to the storage, so fixpath can work.
34015     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34016   fi
34017 
34018     else
34019       # We're on a unix platform. Hooray! :)
34020       # First separate the path from the arguments. This will split at the first
34021       # space.
34022       complete="$CC"
34023       path="${complete%% *}"
34024       tmp="$complete EOL"
34025       arguments="${tmp#* }"
34026 
34027       # Cannot rely on the command "which" here since it doesn't always work.
34028       is_absolute_path=`$ECHO "$path" | $GREP ^/`
34029       if test -z "$is_absolute_path"; then
34030         # Path to executable is not absolute. Find it.
34031         IFS_save="$IFS"
34032         IFS=:
34033         for p in $PATH; do
34034           if test -f "$p/$path" && test -x "$p/$path"; then
34035             new_path="$p/$path"
34036             break
34037           fi
34038         done
34039         IFS="$IFS_save"
34040       else
34041         # This is an absolute path, we can use it without further modifications.
34042         new_path="$path"
34043       fi
34044 
34045       if test "x$new_path" = x; then
34046         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34047 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34048         has_space=`$ECHO "$complete" | $GREP " "`
34049         if test "x$has_space" != x; then
34050           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34051 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34052         fi
34053         as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34054       fi
34055     fi
34056 
34057     # Now join together the path and the arguments once again
34058     if test "x$arguments" != xEOL; then
34059       new_complete="$new_path ${arguments% *}"
34060     else
34061       new_complete="$new_path"
34062     fi
34063 
34064     if test "x$complete" != "x$new_complete"; then
34065       CC="$new_complete"
34066       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
34067 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
34068     fi
34069   fi
34070 
34071   TEST_COMPILER="$CC"
34072 
34073   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
34074 $as_echo_n "checking resolved symbolic links for CC... " >&6; }
34075   SYMLINK_ORIGINAL="$TEST_COMPILER"
34076 
34077   if test "x$OPENJDK_BUILD_OS" != xwindows; then
34078     # Follow a chain of symbolic links. Use readlink
34079     # where it exists, else fall back to horribly
34080     # complicated shell code.
34081     if test "x$READLINK_TESTED" != yes; then
34082       # On MacOSX there is a readlink tool with a different
34083       # purpose than the GNU readlink tool. Check the found readlink.
34084       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34085       if test "x$ISGNU" = x; then
34086         # A readlink that we do not know how to use.
34087         # Are there other non-GNU readlinks out there?
34088         READLINK_TESTED=yes
34089         READLINK=
34090       fi
34091     fi
34092 
34093     if test "x$READLINK" != x; then
34094       SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34095     else
34096       # Save the current directory for restoring afterwards
34097       STARTDIR=$PWD
34098       COUNTER=0
34099       sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34100       sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34101       cd $sym_link_dir
34102       # Use -P flag to resolve symlinks in directories.
34103       cd `$THEPWDCMD -P`
34104       sym_link_dir=`$THEPWDCMD -P`
34105       # Resolve file symlinks
34106       while test $COUNTER -lt 20; do
34107         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34108         if test "x$ISLINK" == x; then
34109           # This is not a symbolic link! We are done!
34110           break
34111         fi
34112         # Again resolve directory symlinks since the target of the just found
34113         # link could be in a different directory
34114         cd `$DIRNAME $ISLINK`
34115         sym_link_dir=`$THEPWDCMD -P`
34116         sym_link_file=`$BASENAME $ISLINK`
34117         let COUNTER=COUNTER+1
34118       done
34119       cd $STARTDIR
34120       SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34121     fi
34122   fi
34123 
34124   if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34125     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34126 $as_echo "no symlink" >&6; }
34127   else
34128     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34129 $as_echo "$SYMLINK_ORIGINAL" >&6; }
34130 
34131     # We can't handle ccache by gcc wrappers, since we need to know if we're
34132     # using ccache. Instead ccache usage must be controlled by a configure option.
34133     COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34134     if test "x$COMPILER_BASENAME" = "xccache"; then
34135       { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34136 $as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34137       as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34138     fi
34139   fi
34140 
34141 
34142   COMPILER=$CC
34143   COMPILER_NAME=$COMPILER_NAME
34144 
34145   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34146     # cc -V output typically looks like
34147     #     cc: Sun C 5.12 Linux_i386 2011/11/16
34148     # or
34149     #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
34150     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34151     # Check that this is likely to be the Solaris Studio cc.
34152     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
34153     if test $? -ne 0; then
34154       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34155       { $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
34156 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34157       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34158 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34159       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34160 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34161       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34162     fi
34163     # Remove usage instructions (if present), and
34164     # collapse compiler output into a single line
34165     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34166         $SED -e 's/ *[Uu]sage:.*//'`
34167     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34168         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34169   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34170     # xlc -qversion output typically looks like
34171     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34172     #     Version: 11.01.0000.0015
34173     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34174     # Check that this is likely to be the IBM XL C compiler.
34175     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34176     if test $? -ne 0; then
34177       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34178       { $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
34179 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34180       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34181 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34182       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34183 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34184       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34185     fi
34186     # Collapse compiler output into a single line
34187     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34188     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34189         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34190   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34191     # There is no specific version flag, but all output starts with a version string.
34192     # First line typically looks something like:
34193     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34194     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34195     # Check that this is likely to be Microsoft CL.EXE.
34196     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34197     if test $? -ne 0; then
34198       { $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
34199 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34200       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34201 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34202       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34203     fi
34204     # Collapse compiler output into a single line
34205     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34206     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34207         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34208   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34209     # gcc --version output typically looks like
34210     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34211     #     Copyright (C) 2013 Free Software Foundation, Inc.
34212     #     This is free software; see the source for copying conditions.  There is NO
34213     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34214     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34215     # Check that this is likely to be GCC.
34216     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34217     if test $? -ne 0; then
34218       { $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
34219 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34220       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34221 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34222       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34223     fi
34224     # Remove Copyright and legalese from version string, and
34225     # collapse into a single line
34226     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34227         $SED -e 's/ *Copyright .*//'`
34228     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34229         $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34230   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34231     # clang --version output typically looks like
34232     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34233     #    clang version 3.3 (tags/RELEASE_33/final)
34234     # or
34235     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34236     #    Target: x86_64-pc-linux-gnu
34237     #    Thread model: posix
34238     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34239     # Check that this is likely to be clang
34240     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34241     if test $? -ne 0; then
34242       { $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
34243 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34244       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34245 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34246       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34247     fi
34248     # Collapse compiler output into a single line
34249     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34250     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34251         $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34252   else
34253       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34254   fi
34255   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34256   CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34257   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34258   CC_VERSION_STRING="$COMPILER_VERSION_STRING"
34259 
34260   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34261 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34262 
34263 
34264   # Now that we have resolved CC ourself, let autoconf have its go at it
34265   ac_ext=c
34266 ac_cpp='$CPP $CPPFLAGS'
34267 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34268 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34269 ac_compiler_gnu=$ac_cv_c_compiler_gnu
34270 if test -n "$ac_tool_prefix"; then
34271   for ac_prog in $CC
34272   do
34273     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34274 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34276 $as_echo_n "checking for $ac_word... " >&6; }
34277 if ${ac_cv_prog_CC+:} false; then :
34278   $as_echo_n "(cached) " >&6
34279 else
34280   if test -n "$CC"; then
34281   ac_cv_prog_CC="$CC" # Let the user override the test.
34282 else
34283 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34284 for as_dir in $PATH
34285 do
34286   IFS=$as_save_IFS
34287   test -z "$as_dir" && as_dir=.
34288     for ac_exec_ext in '' $ac_executable_extensions; do
34289   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34290     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
34291     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34292     break 2
34293   fi
34294 done
34295   done
34296 IFS=$as_save_IFS
34297 
34298 fi
34299 fi
34300 CC=$ac_cv_prog_CC
34301 if test -n "$CC"; then
34302   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
34303 $as_echo "$CC" >&6; }
34304 else
34305   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34306 $as_echo "no" >&6; }
34307 fi
34308 
34309 
34310     test -n "$CC" && break
34311   done
34312 fi
34313 if test -z "$CC"; then
34314   ac_ct_CC=$CC
34315   for ac_prog in $CC
34316 do
34317   # Extract the first word of "$ac_prog", so it can be a program name with args.
34318 set dummy $ac_prog; ac_word=$2
34319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34320 $as_echo_n "checking for $ac_word... " >&6; }
34321 if ${ac_cv_prog_ac_ct_CC+:} false; then :
34322   $as_echo_n "(cached) " >&6
34323 else
34324   if test -n "$ac_ct_CC"; then
34325   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
34326 else
34327 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34328 for as_dir in $PATH
34329 do
34330   IFS=$as_save_IFS
34331   test -z "$as_dir" && as_dir=.
34332     for ac_exec_ext in '' $ac_executable_extensions; do
34333   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34334     ac_cv_prog_ac_ct_CC="$ac_prog"
34335     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34336     break 2
34337   fi
34338 done
34339   done
34340 IFS=$as_save_IFS
34341 
34342 fi
34343 fi
34344 ac_ct_CC=$ac_cv_prog_ac_ct_CC
34345 if test -n "$ac_ct_CC"; then
34346   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
34347 $as_echo "$ac_ct_CC" >&6; }
34348 else
34349   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34350 $as_echo "no" >&6; }
34351 fi
34352 
34353 
34354   test -n "$ac_ct_CC" && break
34355 done
34356 
34357   if test "x$ac_ct_CC" = x; then
34358     CC=""
34359   else
34360     case $cross_compiling:$ac_tool_warned in
34361 yes:)
34362 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34363 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34364 ac_tool_warned=yes ;;
34365 esac
34366     CC=$ac_ct_CC
34367   fi
34368 fi
34369 
34370 
34371 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34372 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34373 as_fn_error $? "no acceptable C compiler found in \$PATH
34374 See \`config.log' for more details" "$LINENO" 5; }
34375 
34376 # Provide some information about the compiler.
34377 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
34378 set X $ac_compile
34379 ac_compiler=$2
34380 for ac_option in --version -v -V -qversion; do
34381   { { ac_try="$ac_compiler $ac_option >&5"
34382 case "(($ac_try" in
34383   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34384   *) ac_try_echo=$ac_try;;
34385 esac
34386 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34387 $as_echo "$ac_try_echo"; } >&5
34388   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
34389   ac_status=$?
34390   if test -s conftest.err; then
34391     sed '10a\
34392 ... rest of stderr output deleted ...
34393          10q' conftest.err >conftest.er1
34394     cat conftest.er1 >&5
34395   fi
34396   rm -f conftest.er1 conftest.err
34397   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34398   test $ac_status = 0; }
34399 done
34400 
34401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34402 /* end confdefs.h.  */
34403 
34404 int
34405 main ()
34406 {
34407 
34408   ;
34409   return 0;
34410 }
34411 _ACEOF
34412 ac_clean_files_save=$ac_clean_files
34413 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
34414 # Try to create an executable without -o first, disregard a.out.
34415 # It will help us diagnose broken compilers, and finding out an intuition
34416 # of exeext.
34417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
34418 $as_echo_n "checking whether the C compiler works... " >&6; }
34419 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
34420 
34421 # The possible output files:
34422 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
34423 
34424 ac_rmfiles=
34425 for ac_file in $ac_files
34426 do
34427   case $ac_file in
34428     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34429     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
34430   esac
34431 done
34432 rm -f $ac_rmfiles
34433 
34434 if { { ac_try="$ac_link_default"
34435 case "(($ac_try" in
34436   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34437   *) ac_try_echo=$ac_try;;
34438 esac
34439 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34440 $as_echo "$ac_try_echo"; } >&5
34441   (eval "$ac_link_default") 2>&5
34442   ac_status=$?
34443   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34444   test $ac_status = 0; }; then :
34445   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
34446 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
34447 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
34448 # so that the user can short-circuit this test for compilers unknown to
34449 # Autoconf.
34450 for ac_file in $ac_files ''
34451 do
34452   test -f "$ac_file" || continue
34453   case $ac_file in
34454     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
34455         ;;
34456     [ab].out )
34457         # We found the default executable, but exeext='' is most
34458         # certainly right.
34459         break;;
34460     *.* )
34461         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
34462         then :; else
34463            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34464         fi
34465         # We set ac_cv_exeext here because the later test for it is not
34466         # safe: cross compilers may not add the suffix if given an `-o'
34467         # argument, so we may need to know it at that point already.
34468         # Even if this section looks crufty: it has the advantage of
34469         # actually working.
34470         break;;
34471     * )
34472         break;;
34473   esac
34474 done
34475 test "$ac_cv_exeext" = no && ac_cv_exeext=
34476 
34477 else
34478   ac_file=''
34479 fi
34480 if test -z "$ac_file"; then :
34481   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34482 $as_echo "no" >&6; }
34483 $as_echo "$as_me: failed program was:" >&5
34484 sed 's/^/| /' conftest.$ac_ext >&5
34485 
34486 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34487 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34488 as_fn_error 77 "C compiler cannot create executables
34489 See \`config.log' for more details" "$LINENO" 5; }
34490 else
34491   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34492 $as_echo "yes" >&6; }
34493 fi
34494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
34495 $as_echo_n "checking for C compiler default output file name... " >&6; }
34496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
34497 $as_echo "$ac_file" >&6; }
34498 ac_exeext=$ac_cv_exeext
34499 
34500 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
34501 ac_clean_files=$ac_clean_files_save
34502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
34503 $as_echo_n "checking for suffix of executables... " >&6; }
34504 if { { ac_try="$ac_link"
34505 case "(($ac_try" in
34506   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34507   *) ac_try_echo=$ac_try;;
34508 esac
34509 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34510 $as_echo "$ac_try_echo"; } >&5
34511   (eval "$ac_link") 2>&5
34512   ac_status=$?
34513   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34514   test $ac_status = 0; }; then :
34515   # If both `conftest.exe' and `conftest' are `present' (well, observable)
34516 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
34517 # work properly (i.e., refer to `conftest.exe'), while it won't with
34518 # `rm'.
34519 for ac_file in conftest.exe conftest conftest.*; do
34520   test -f "$ac_file" || continue
34521   case $ac_file in
34522     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34523     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34524           break;;
34525     * ) break;;
34526   esac
34527 done
34528 else
34529   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34530 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34531 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
34532 See \`config.log' for more details" "$LINENO" 5; }
34533 fi
34534 rm -f conftest conftest$ac_cv_exeext
34535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
34536 $as_echo "$ac_cv_exeext" >&6; }
34537 
34538 rm -f conftest.$ac_ext
34539 EXEEXT=$ac_cv_exeext
34540 ac_exeext=$EXEEXT
34541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34542 /* end confdefs.h.  */
34543 #include <stdio.h>
34544 int
34545 main ()
34546 {
34547 FILE *f = fopen ("conftest.out", "w");
34548  return ferror (f) || fclose (f) != 0;
34549 
34550   ;
34551   return 0;
34552 }
34553 _ACEOF
34554 ac_clean_files="$ac_clean_files conftest.out"
34555 # Check that the compiler produces executables we can run.  If not, either
34556 # the compiler is broken, or we cross compile.
34557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
34558 $as_echo_n "checking whether we are cross compiling... " >&6; }
34559 if test "$cross_compiling" != yes; then
34560   { { ac_try="$ac_link"
34561 case "(($ac_try" in
34562   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34563   *) ac_try_echo=$ac_try;;
34564 esac
34565 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34566 $as_echo "$ac_try_echo"; } >&5
34567   (eval "$ac_link") 2>&5
34568   ac_status=$?
34569   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34570   test $ac_status = 0; }
34571   if { ac_try='./conftest$ac_cv_exeext'
34572   { { case "(($ac_try" in
34573   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34574   *) ac_try_echo=$ac_try;;
34575 esac
34576 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34577 $as_echo "$ac_try_echo"; } >&5
34578   (eval "$ac_try") 2>&5
34579   ac_status=$?
34580   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34581   test $ac_status = 0; }; }; then
34582     cross_compiling=no
34583   else
34584     if test "$cross_compiling" = maybe; then
34585         cross_compiling=yes
34586     else
34587         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34588 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34589 as_fn_error $? "cannot run C compiled programs.
34590 If you meant to cross compile, use \`--host'.
34591 See \`config.log' for more details" "$LINENO" 5; }
34592     fi
34593   fi
34594 fi
34595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34596 $as_echo "$cross_compiling" >&6; }
34597 
34598 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34599 ac_clean_files=$ac_clean_files_save
34600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34601 $as_echo_n "checking for suffix of object files... " >&6; }
34602 if ${ac_cv_objext+:} false; then :
34603   $as_echo_n "(cached) " >&6
34604 else
34605   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34606 /* end confdefs.h.  */
34607 
34608 int
34609 main ()
34610 {
34611 
34612   ;
34613   return 0;
34614 }
34615 _ACEOF
34616 rm -f conftest.o conftest.obj
34617 if { { ac_try="$ac_compile"
34618 case "(($ac_try" in
34619   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34620   *) ac_try_echo=$ac_try;;
34621 esac
34622 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34623 $as_echo "$ac_try_echo"; } >&5
34624   (eval "$ac_compile") 2>&5
34625   ac_status=$?
34626   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34627   test $ac_status = 0; }; then :
34628   for ac_file in conftest.o conftest.obj conftest.*; do
34629   test -f "$ac_file" || continue;
34630   case $ac_file in
34631     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
34632     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
34633        break;;
34634   esac
34635 done
34636 else
34637   $as_echo "$as_me: failed program was:" >&5
34638 sed 's/^/| /' conftest.$ac_ext >&5
34639 
34640 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34641 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34642 as_fn_error $? "cannot compute suffix of object files: cannot compile
34643 See \`config.log' for more details" "$LINENO" 5; }
34644 fi
34645 rm -f conftest.$ac_cv_objext conftest.$ac_ext
34646 fi
34647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
34648 $as_echo "$ac_cv_objext" >&6; }
34649 OBJEXT=$ac_cv_objext
34650 ac_objext=$OBJEXT
34651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34652 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
34653 if ${ac_cv_c_compiler_gnu+:} false; then :
34654   $as_echo_n "(cached) " >&6
34655 else
34656   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34657 /* end confdefs.h.  */
34658 
34659 int
34660 main ()
34661 {
34662 #ifndef __GNUC__
34663        choke me
34664 #endif
34665 
34666   ;
34667   return 0;
34668 }
34669 _ACEOF
34670 if ac_fn_c_try_compile "$LINENO"; then :
34671   ac_compiler_gnu=yes
34672 else
34673   ac_compiler_gnu=no
34674 fi
34675 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34676 ac_cv_c_compiler_gnu=$ac_compiler_gnu
34677 
34678 fi
34679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
34680 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
34681 if test $ac_compiler_gnu = yes; then
34682   GCC=yes
34683 else
34684   GCC=
34685 fi
34686 ac_test_CFLAGS=${CFLAGS+set}
34687 ac_save_CFLAGS=$CFLAGS
34688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
34689 $as_echo_n "checking whether $CC accepts -g... " >&6; }
34690 if ${ac_cv_prog_cc_g+:} false; then :
34691   $as_echo_n "(cached) " >&6
34692 else
34693   ac_save_c_werror_flag=$ac_c_werror_flag
34694    ac_c_werror_flag=yes
34695    ac_cv_prog_cc_g=no
34696    CFLAGS="-g"
34697    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34698 /* end confdefs.h.  */
34699 
34700 int
34701 main ()
34702 {
34703 
34704   ;
34705   return 0;
34706 }
34707 _ACEOF
34708 if ac_fn_c_try_compile "$LINENO"; then :
34709   ac_cv_prog_cc_g=yes
34710 else
34711   CFLAGS=""
34712       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34713 /* end confdefs.h.  */
34714 
34715 int
34716 main ()
34717 {
34718 
34719   ;
34720   return 0;
34721 }
34722 _ACEOF
34723 if ac_fn_c_try_compile "$LINENO"; then :
34724 
34725 else
34726   ac_c_werror_flag=$ac_save_c_werror_flag
34727          CFLAGS="-g"
34728          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34729 /* end confdefs.h.  */
34730 
34731 int
34732 main ()
34733 {
34734 
34735   ;
34736   return 0;
34737 }
34738 _ACEOF
34739 if ac_fn_c_try_compile "$LINENO"; then :
34740   ac_cv_prog_cc_g=yes
34741 fi
34742 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34743 fi
34744 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34745 fi
34746 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34747    ac_c_werror_flag=$ac_save_c_werror_flag
34748 fi
34749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
34750 $as_echo "$ac_cv_prog_cc_g" >&6; }
34751 if test "$ac_test_CFLAGS" = set; then
34752   CFLAGS=$ac_save_CFLAGS
34753 elif test $ac_cv_prog_cc_g = yes; then
34754   if test "$GCC" = yes; then
34755     CFLAGS="-g -O2"
34756   else
34757     CFLAGS="-g"
34758   fi
34759 else
34760   if test "$GCC" = yes; then
34761     CFLAGS="-O2"
34762   else
34763     CFLAGS=
34764   fi
34765 fi
34766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
34767 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
34768 if ${ac_cv_prog_cc_c89+:} false; then :
34769   $as_echo_n "(cached) " >&6
34770 else
34771   ac_cv_prog_cc_c89=no
34772 ac_save_CC=$CC
34773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34774 /* end confdefs.h.  */
34775 #include <stdarg.h>
34776 #include <stdio.h>
34777 struct stat;
34778 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
34779 struct buf { int x; };
34780 FILE * (*rcsopen) (struct buf *, struct stat *, int);
34781 static char *e (p, i)
34782      char **p;
34783      int i;
34784 {
34785   return p[i];
34786 }
34787 static char *f (char * (*g) (char **, int), char **p, ...)
34788 {
34789   char *s;
34790   va_list v;
34791   va_start (v,p);
34792   s = g (p, va_arg (v,int));
34793   va_end (v);
34794   return s;
34795 }
34796 
34797 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
34798    function prototypes and stuff, but not '\xHH' hex character constants.
34799    These don't provoke an error unfortunately, instead are silently treated
34800    as 'x'.  The following induces an error, until -std is added to get
34801    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
34802    array size at least.  It's necessary to write '\x00'==0 to get something
34803    that's true only with -std.  */
34804 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
34805 
34806 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
34807    inside strings and character constants.  */
34808 #define FOO(x) 'x'
34809 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
34810 
34811 int test (int i, double x);
34812 struct s1 {int (*f) (int a);};
34813 struct s2 {int (*f) (double a);};
34814 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
34815 int argc;
34816 char **argv;
34817 int
34818 main ()
34819 {
34820 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
34821   ;
34822   return 0;
34823 }
34824 _ACEOF
34825 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
34826         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
34827 do
34828   CC="$ac_save_CC $ac_arg"
34829   if ac_fn_c_try_compile "$LINENO"; then :
34830   ac_cv_prog_cc_c89=$ac_arg
34831 fi
34832 rm -f core conftest.err conftest.$ac_objext
34833   test "x$ac_cv_prog_cc_c89" != "xno" && break
34834 done
34835 rm -f conftest.$ac_ext
34836 CC=$ac_save_CC
34837 
34838 fi
34839 # AC_CACHE_VAL
34840 case "x$ac_cv_prog_cc_c89" in
34841   x)
34842     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
34843 $as_echo "none needed" >&6; } ;;
34844   xno)
34845     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
34846 $as_echo "unsupported" >&6; } ;;
34847   *)
34848     CC="$CC $ac_cv_prog_cc_c89"
34849     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
34850 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
34851 esac
34852 if test "x$ac_cv_prog_cc_c89" != xno; then :
34853 
34854 fi
34855 
34856 ac_ext=cpp
34857 ac_cpp='$CXXCPP $CPPFLAGS'
34858 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34859 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34860 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34861 
34862 
34863 
34864   COMPILER_NAME=C++
34865   SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
34866 
34867   if test "x$CXX" != x; then
34868     # User has supplied compiler name already, always let that override.
34869     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
34870 $as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
34871     if test "x`basename $CXX`" = "x$CXX"; then
34872       # A command without a complete path is provided, search $PATH.
34873 
34874       for ac_prog in $CXX
34875 do
34876   # Extract the first word of "$ac_prog", so it can be a program name with args.
34877 set dummy $ac_prog; ac_word=$2
34878 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34879 $as_echo_n "checking for $ac_word... " >&6; }
34880 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34881   $as_echo_n "(cached) " >&6
34882 else
34883   case $POTENTIAL_CXX in
34884   [\\/]* | ?:[\\/]*)
34885   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34886   ;;
34887   *)
34888   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34889 for as_dir in $PATH
34890 do
34891   IFS=$as_save_IFS
34892   test -z "$as_dir" && as_dir=.
34893     for ac_exec_ext in '' $ac_executable_extensions; do
34894   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34895     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34896     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34897     break 2
34898   fi
34899 done
34900   done
34901 IFS=$as_save_IFS
34902 
34903   ;;
34904 esac
34905 fi
34906 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34907 if test -n "$POTENTIAL_CXX"; then
34908   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34909 $as_echo "$POTENTIAL_CXX" >&6; }
34910 else
34911   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34912 $as_echo "no" >&6; }
34913 fi
34914 
34915 
34916   test -n "$POTENTIAL_CXX" && break
34917 done
34918 
34919       if test "x$POTENTIAL_CXX" != x; then
34920         CXX=$POTENTIAL_CXX
34921       else
34922         as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
34923       fi
34924     else
34925       # Otherwise it might already be a complete path
34926       if test ! -x "$CXX"; then
34927         as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
34928       fi
34929     fi
34930   else
34931     # No user supplied value. Locate compiler ourselves.
34932 
34933     # If we are cross compiling, assume cross compilation tools follows the
34934     # cross compilation standard where they are prefixed with the autoconf
34935     # standard name for the target. For example the binary
34936     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
34937     # If we are not cross compiling, then the default compiler name will be
34938     # used.
34939 
34940     CXX=
34941     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
34942     # before checking the rest of the PATH.
34943     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
34944     # step, this should not be necessary.
34945     if test -n "$TOOLCHAIN_PATH"; then
34946       PATH_save="$PATH"
34947       PATH="$TOOLCHAIN_PATH"
34948       if test -n "$ac_tool_prefix"; then
34949   # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
34950 set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
34951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34952 $as_echo_n "checking for $ac_word... " >&6; }
34953 if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
34954   $as_echo_n "(cached) " >&6
34955 else
34956   case $TOOLCHAIN_PATH_CXX in
34957   [\\/]* | ?:[\\/]*)
34958   ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
34959   ;;
34960   *)
34961   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34962 for as_dir in $PATH
34963 do
34964   IFS=$as_save_IFS
34965   test -z "$as_dir" && as_dir=.
34966     for ac_exec_ext in '' $ac_executable_extensions; do
34967   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34968     ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
34969     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34970     break 2
34971   fi
34972 done
34973   done
34974 IFS=$as_save_IFS
34975 
34976   ;;
34977 esac
34978 fi
34979 TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
34980 if test -n "$TOOLCHAIN_PATH_CXX"; then
34981   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
34982 $as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
34983 else
34984   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34985 $as_echo "no" >&6; }
34986 fi
34987 
34988 
34989 fi
34990 if test -z "$ac_cv_path_TOOLCHAIN_PATH_CXX"; then
34991   ac_pt_TOOLCHAIN_PATH_CXX=$TOOLCHAIN_PATH_CXX
34992   # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
34993 set dummy $SEARCH_LIST; ac_word=$2
34994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34995 $as_echo_n "checking for $ac_word... " >&6; }
34996 if ${ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX+:} false; then :
34997   $as_echo_n "(cached) " >&6
34998 else
34999   case $ac_pt_TOOLCHAIN_PATH_CXX in
35000   [\\/]* | ?:[\\/]*)
35001   ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX="$ac_pt_TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
35002   ;;
35003   *)
35004   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35005 for as_dir in $PATH
35006 do
35007   IFS=$as_save_IFS
35008   test -z "$as_dir" && as_dir=.
35009     for ac_exec_ext in '' $ac_executable_extensions; do
35010   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35011     ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
35012     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35013     break 2
35014   fi
35015 done
35016   done
35017 IFS=$as_save_IFS
35018 
35019   ;;
35020 esac
35021 fi
35022 ac_pt_TOOLCHAIN_PATH_CXX=$ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX
35023 if test -n "$ac_pt_TOOLCHAIN_PATH_CXX"; then
35024   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_TOOLCHAIN_PATH_CXX" >&5
35025 $as_echo "$ac_pt_TOOLCHAIN_PATH_CXX" >&6; }
35026 else
35027   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35028 $as_echo "no" >&6; }
35029 fi
35030 
35031   if test "x$ac_pt_TOOLCHAIN_PATH_CXX" = x; then
35032     TOOLCHAIN_PATH_CXX=""
35033   else
35034     case $cross_compiling:$ac_tool_warned in
35035 yes:)
35036 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35037 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35038 ac_tool_warned=yes ;;
35039 esac
35040     TOOLCHAIN_PATH_CXX=$ac_pt_TOOLCHAIN_PATH_CXX
35041   fi
35042 else
35043   TOOLCHAIN_PATH_CXX="$ac_cv_path_TOOLCHAIN_PATH_CXX"
35044 fi
35045 
35046       CXX=$TOOLCHAIN_PATH_CXX
35047       PATH="$PATH_save"
35048     fi
35049 
35050     # AC_PATH_TOOL can't be run multiple times with the same variable,
35051     # so create a new name for this run.
35052     if test "x$CXX" = x; then
35053       if test -n "$ac_tool_prefix"; then
35054   # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
35055 set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
35056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35057 $as_echo_n "checking for $ac_word... " >&6; }
35058 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
35059   $as_echo_n "(cached) " >&6
35060 else
35061   case $POTENTIAL_CXX in
35062   [\\/]* | ?:[\\/]*)
35063   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
35064   ;;
35065   *)
35066   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35067 for as_dir in $PATH
35068 do
35069   IFS=$as_save_IFS
35070   test -z "$as_dir" && as_dir=.
35071     for ac_exec_ext in '' $ac_executable_extensions; do
35072   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35073     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35074     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35075     break 2
35076   fi
35077 done
35078   done
35079 IFS=$as_save_IFS
35080 
35081   ;;
35082 esac
35083 fi
35084 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
35085 if test -n "$POTENTIAL_CXX"; then
35086   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
35087 $as_echo "$POTENTIAL_CXX" >&6; }
35088 else
35089   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35090 $as_echo "no" >&6; }
35091 fi
35092 
35093 
35094 fi
35095 if test -z "$ac_cv_path_POTENTIAL_CXX"; then
35096   ac_pt_POTENTIAL_CXX=$POTENTIAL_CXX
35097   # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
35098 set dummy $SEARCH_LIST; ac_word=$2
35099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35100 $as_echo_n "checking for $ac_word... " >&6; }
35101 if ${ac_cv_path_ac_pt_POTENTIAL_CXX+:} false; then :
35102   $as_echo_n "(cached) " >&6
35103 else
35104   case $ac_pt_POTENTIAL_CXX in
35105   [\\/]* | ?:[\\/]*)
35106   ac_cv_path_ac_pt_POTENTIAL_CXX="$ac_pt_POTENTIAL_CXX" # Let the user override the test with a path.
35107   ;;
35108   *)
35109   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35110 for as_dir in $PATH
35111 do
35112   IFS=$as_save_IFS
35113   test -z "$as_dir" && as_dir=.
35114     for ac_exec_ext in '' $ac_executable_extensions; do
35115   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35116     ac_cv_path_ac_pt_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35117     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35118     break 2
35119   fi
35120 done
35121   done
35122 IFS=$as_save_IFS
35123 
35124   ;;
35125 esac
35126 fi
35127 ac_pt_POTENTIAL_CXX=$ac_cv_path_ac_pt_POTENTIAL_CXX
35128 if test -n "$ac_pt_POTENTIAL_CXX"; then
35129   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_POTENTIAL_CXX" >&5
35130 $as_echo "$ac_pt_POTENTIAL_CXX" >&6; }
35131 else
35132   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35133 $as_echo "no" >&6; }
35134 fi
35135 
35136   if test "x$ac_pt_POTENTIAL_CXX" = x; then
35137     POTENTIAL_CXX=""
35138   else
35139     case $cross_compiling:$ac_tool_warned in
35140 yes:)
35141 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35142 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35143 ac_tool_warned=yes ;;
35144 esac
35145     POTENTIAL_CXX=$ac_pt_POTENTIAL_CXX
35146   fi
35147 else
35148   POTENTIAL_CXX="$ac_cv_path_POTENTIAL_CXX"
35149 fi
35150 
35151       CXX=$POTENTIAL_CXX
35152     fi
35153 
35154     if test "x$CXX" = x; then
35155 
35156   # Print a helpful message on how to acquire the necessary build dependency.
35157   # devkit is the help tag: freetype, cups, alsa etc
35158   MISSING_DEPENDENCY=devkit
35159 
35160   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35161     cygwin_help $MISSING_DEPENDENCY
35162   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35163     msys_help $MISSING_DEPENDENCY
35164   else
35165     PKGHANDLER_COMMAND=
35166 
35167     case $PKGHANDLER in
35168       apt-get)
35169         apt_help     $MISSING_DEPENDENCY ;;
35170       yum)
35171         yum_help     $MISSING_DEPENDENCY ;;
35172       brew)
35173         brew_help    $MISSING_DEPENDENCY ;;
35174       port)
35175         port_help    $MISSING_DEPENDENCY ;;
35176       pkgutil)
35177         pkgutil_help $MISSING_DEPENDENCY ;;
35178       pkgadd)
35179         pkgadd_help  $MISSING_DEPENDENCY ;;
35180     esac
35181 
35182     if test "x$PKGHANDLER_COMMAND" != x; then
35183       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
35184     fi
35185   fi
35186 
35187       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
35188     fi
35189   fi
35190 
35191   # Now we have a compiler binary in CXX. Make sure it's okay.
35192 
35193   # Only process if variable expands to non-empty
35194 
35195   if test "x$CXX" != x; then
35196     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35197 
35198   # First separate the path from the arguments. This will split at the first
35199   # space.
35200   complete="$CXX"
35201   path="${complete%% *}"
35202   tmp="$complete EOL"
35203   arguments="${tmp#* }"
35204 
35205   # Input might be given as Windows format, start by converting to
35206   # unix format.
35207   new_path=`$CYGPATH -u "$path"`
35208 
35209   # Now try to locate executable using which
35210   new_path=`$WHICH "$new_path" 2> /dev/null`
35211   # bat and cmd files are not always considered executable in cygwin causing which
35212   # to not find them
35213   if test "x$new_path" = x \
35214       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35215       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35216     new_path=`$CYGPATH -u "$path"`
35217   fi
35218   if test "x$new_path" = x; then
35219     # Oops. Which didn't find the executable.
35220     # The splitting of arguments from the executable at a space might have been incorrect,
35221     # since paths with space are more likely in Windows. Give it another try with the whole
35222     # argument.
35223     path="$complete"
35224     arguments="EOL"
35225     new_path=`$CYGPATH -u "$path"`
35226     new_path=`$WHICH "$new_path" 2> /dev/null`
35227     # bat and cmd files are not always considered executable in cygwin causing which
35228     # to not find them
35229     if test "x$new_path" = x \
35230         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35231         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35232       new_path=`$CYGPATH -u "$path"`
35233     fi
35234     if test "x$new_path" = x; then
35235       # It's still not found. Now this is an unrecoverable error.
35236       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35237 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35238       has_space=`$ECHO "$complete" | $GREP " "`
35239       if test "x$has_space" != x; then
35240         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35241 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35242       fi
35243       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35244     fi
35245   fi
35246 
35247   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35248   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35249   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35250   # "foo.exe" is OK but "foo" is an error.
35251   #
35252   # This test is therefore slightly more accurate than "test -f" to check for file presence.
35253   # It is also a way to make sure we got the proper file name for the real test later on.
35254   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35255   if test "x$test_shortpath" = x; then
35256     # Short path failed, file does not exist as specified.
35257     # Try adding .exe or .cmd
35258     if test -f "${new_path}.exe"; then
35259       input_to_shortpath="${new_path}.exe"
35260     elif test -f "${new_path}.cmd"; then
35261       input_to_shortpath="${new_path}.cmd"
35262     else
35263       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
35264 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
35265       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35266 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35267       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35268     fi
35269   else
35270     input_to_shortpath="$new_path"
35271   fi
35272 
35273   # Call helper function which possibly converts this using DOS-style short mode.
35274   # If so, the updated path is stored in $new_path.
35275   new_path="$input_to_shortpath"
35276 
35277   input_path="$input_to_shortpath"
35278   # Check if we need to convert this using DOS-style short mode. If the path
35279   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35280   # take no chances and rewrite it.
35281   # Note: m4 eats our [], so we need to use [ and ] instead.
35282   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35283   if test "x$has_forbidden_chars" != x; then
35284     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35285     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35286     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35287     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35288       # Going to short mode and back again did indeed matter. Since short mode is
35289       # case insensitive, let's make it lowercase to improve readability.
35290       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35291       # Now convert it back to Unix-style (cygpath)
35292       input_path=`$CYGPATH -u "$shortmode_path"`
35293       new_path="$input_path"
35294     fi
35295   fi
35296 
35297   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35298   if test "x$test_cygdrive_prefix" = x; then
35299     # As a simple fix, exclude /usr/bin since it's not a real path.
35300     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35301       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35302       # a path prefixed by /cygdrive for fixpath to work.
35303       new_path="$CYGWIN_ROOT_PATH$input_path"
35304     fi
35305   fi
35306 
35307   # remove trailing .exe if any
35308   new_path="${new_path/%.exe/}"
35309 
35310     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35311 
35312   # First separate the path from the arguments. This will split at the first
35313   # space.
35314   complete="$CXX"
35315   path="${complete%% *}"
35316   tmp="$complete EOL"
35317   arguments="${tmp#* }"
35318 
35319   # Input might be given as Windows format, start by converting to
35320   # unix format.
35321   new_path="$path"
35322 
35323   windows_path="$new_path"
35324   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35325     unix_path=`$CYGPATH -u "$windows_path"`
35326     new_path="$unix_path"
35327   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35328     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35329     new_path="$unix_path"
35330   fi
35331 
35332 
35333   # Now try to locate executable using which
35334   new_path=`$WHICH "$new_path" 2> /dev/null`
35335 
35336   if test "x$new_path" = x; then
35337     # Oops. Which didn't find the executable.
35338     # The splitting of arguments from the executable at a space might have been incorrect,
35339     # since paths with space are more likely in Windows. Give it another try with the whole
35340     # argument.
35341     path="$complete"
35342     arguments="EOL"
35343     new_path="$path"
35344 
35345   windows_path="$new_path"
35346   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35347     unix_path=`$CYGPATH -u "$windows_path"`
35348     new_path="$unix_path"
35349   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35350     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35351     new_path="$unix_path"
35352   fi
35353 
35354 
35355     new_path=`$WHICH "$new_path" 2> /dev/null`
35356     # bat and cmd files are not always considered executable in MSYS causing which
35357     # to not find them
35358     if test "x$new_path" = x \
35359         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35360         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35361       new_path="$path"
35362 
35363   windows_path="$new_path"
35364   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35365     unix_path=`$CYGPATH -u "$windows_path"`
35366     new_path="$unix_path"
35367   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35368     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35369     new_path="$unix_path"
35370   fi
35371 
35372     fi
35373 
35374     if test "x$new_path" = x; then
35375       # It's still not found. Now this is an unrecoverable error.
35376       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35377 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35378       has_space=`$ECHO "$complete" | $GREP " "`
35379       if test "x$has_space" != x; then
35380         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35381 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35382       fi
35383       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35384     fi
35385   fi
35386 
35387   # Now new_path has a complete unix path to the binary
35388   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35389     # Keep paths in /bin as-is, but remove trailing .exe if any
35390     new_path="${new_path/%.exe/}"
35391     # Do not save /bin paths to all_fixpath_prefixes!
35392   else
35393     # Not in mixed or Windows style, start by that.
35394     new_path=`cmd //c echo $new_path`
35395 
35396   input_path="$new_path"
35397   # Check if we need to convert this using DOS-style short mode. If the path
35398   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35399   # take no chances and rewrite it.
35400   # Note: m4 eats our [], so we need to use [ and ] instead.
35401   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35402   if test "x$has_forbidden_chars" != x; then
35403     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35404     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35405   fi
35406 
35407     # Output is in $new_path
35408 
35409   windows_path="$new_path"
35410   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35411     unix_path=`$CYGPATH -u "$windows_path"`
35412     new_path="$unix_path"
35413   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35414     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35415     new_path="$unix_path"
35416   fi
35417 
35418     # remove trailing .exe if any
35419     new_path="${new_path/%.exe/}"
35420 
35421     # Save the first 10 bytes of this path to the storage, so fixpath can work.
35422     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35423   fi
35424 
35425     else
35426       # We're on a unix platform. Hooray! :)
35427       # First separate the path from the arguments. This will split at the first
35428       # space.
35429       complete="$CXX"
35430       path="${complete%% *}"
35431       tmp="$complete EOL"
35432       arguments="${tmp#* }"
35433 
35434       # Cannot rely on the command "which" here since it doesn't always work.
35435       is_absolute_path=`$ECHO "$path" | $GREP ^/`
35436       if test -z "$is_absolute_path"; then
35437         # Path to executable is not absolute. Find it.
35438         IFS_save="$IFS"
35439         IFS=:
35440         for p in $PATH; do
35441           if test -f "$p/$path" && test -x "$p/$path"; then
35442             new_path="$p/$path"
35443             break
35444           fi
35445         done
35446         IFS="$IFS_save"
35447       else
35448         # This is an absolute path, we can use it without further modifications.
35449         new_path="$path"
35450       fi
35451 
35452       if test "x$new_path" = x; then
35453         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35454 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35455         has_space=`$ECHO "$complete" | $GREP " "`
35456         if test "x$has_space" != x; then
35457           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35458 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35459         fi
35460         as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35461       fi
35462     fi
35463 
35464     # Now join together the path and the arguments once again
35465     if test "x$arguments" != xEOL; then
35466       new_complete="$new_path ${arguments% *}"
35467     else
35468       new_complete="$new_path"
35469     fi
35470 
35471     if test "x$complete" != "x$new_complete"; then
35472       CXX="$new_complete"
35473       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
35474 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
35475     fi
35476   fi
35477 
35478   TEST_COMPILER="$CXX"
35479 
35480   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
35481 $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
35482   SYMLINK_ORIGINAL="$TEST_COMPILER"
35483 
35484   if test "x$OPENJDK_BUILD_OS" != xwindows; then
35485     # Follow a chain of symbolic links. Use readlink
35486     # where it exists, else fall back to horribly
35487     # complicated shell code.
35488     if test "x$READLINK_TESTED" != yes; then
35489       # On MacOSX there is a readlink tool with a different
35490       # purpose than the GNU readlink tool. Check the found readlink.
35491       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
35492       if test "x$ISGNU" = x; then
35493         # A readlink that we do not know how to use.
35494         # Are there other non-GNU readlinks out there?
35495         READLINK_TESTED=yes
35496         READLINK=
35497       fi
35498     fi
35499 
35500     if test "x$READLINK" != x; then
35501       SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
35502     else
35503       # Save the current directory for restoring afterwards
35504       STARTDIR=$PWD
35505       COUNTER=0
35506       sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
35507       sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
35508       cd $sym_link_dir
35509       # Use -P flag to resolve symlinks in directories.
35510       cd `$THEPWDCMD -P`
35511       sym_link_dir=`$THEPWDCMD -P`
35512       # Resolve file symlinks
35513       while test $COUNTER -lt 20; do
35514         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
35515         if test "x$ISLINK" == x; then
35516           # This is not a symbolic link! We are done!
35517           break
35518         fi
35519         # Again resolve directory symlinks since the target of the just found
35520         # link could be in a different directory
35521         cd `$DIRNAME $ISLINK`
35522         sym_link_dir=`$THEPWDCMD -P`
35523         sym_link_file=`$BASENAME $ISLINK`
35524         let COUNTER=COUNTER+1
35525       done
35526       cd $STARTDIR
35527       SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
35528     fi
35529   fi
35530 
35531   if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
35532     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
35533 $as_echo "no symlink" >&6; }
35534   else
35535     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
35536 $as_echo "$SYMLINK_ORIGINAL" >&6; }
35537 
35538     # We can't handle ccache by gcc wrappers, since we need to know if we're
35539     # using ccache. Instead ccache usage must be controlled by a configure option.
35540     COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
35541     if test "x$COMPILER_BASENAME" = "xccache"; then
35542       { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
35543 $as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
35544       as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
35545     fi
35546   fi
35547 
35548 
35549   COMPILER=$CXX
35550   COMPILER_NAME=$COMPILER_NAME
35551 
35552   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
35553     # cc -V output typically looks like
35554     #     cc: Sun C 5.12 Linux_i386 2011/11/16
35555     # or
35556     #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
35557     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
35558     # Check that this is likely to be the Solaris Studio cc.
35559     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
35560     if test $? -ne 0; then
35561       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35562       { $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
35563 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35564       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35565 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35566       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
35567 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
35568       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35569     fi
35570     # Remove usage instructions (if present), and
35571     # collapse compiler output into a single line
35572     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
35573         $SED -e 's/ *[Uu]sage:.*//'`
35574     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35575         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
35576   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
35577     # xlc -qversion output typically looks like
35578     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
35579     #     Version: 11.01.0000.0015
35580     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
35581     # Check that this is likely to be the IBM XL C compiler.
35582     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
35583     if test $? -ne 0; then
35584       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35585       { $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
35586 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35587       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35588 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35589       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
35590 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
35591       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35592     fi
35593     # Collapse compiler output into a single line
35594     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35595     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35596         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
35597   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35598     # There is no specific version flag, but all output starts with a version string.
35599     # First line typically looks something like:
35600     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
35601     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
35602     # Check that this is likely to be Microsoft CL.EXE.
35603     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
35604     if test $? -ne 0; then
35605       { $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
35606 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35607       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35608 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35609       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35610     fi
35611     # Collapse compiler output into a single line
35612     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35613     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35614         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
35615   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
35616     # gcc --version output typically looks like
35617     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
35618     #     Copyright (C) 2013 Free Software Foundation, Inc.
35619     #     This is free software; see the source for copying conditions.  There is NO
35620     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
35621     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35622     # Check that this is likely to be GCC.
35623     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
35624     if test $? -ne 0; then
35625       { $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
35626 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35627       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
35628 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
35629       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35630     fi
35631     # Remove Copyright and legalese from version string, and
35632     # collapse into a single line
35633     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
35634         $SED -e 's/ *Copyright .*//'`
35635     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35636         $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
35637   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
35638     # clang --version output typically looks like
35639     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
35640     #    clang version 3.3 (tags/RELEASE_33/final)
35641     # or
35642     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
35643     #    Target: x86_64-pc-linux-gnu
35644     #    Thread model: posix
35645     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35646     # Check that this is likely to be clang
35647     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
35648     if test $? -ne 0; then
35649       { $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
35650 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35651       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35652 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35653       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35654     fi
35655     # Collapse compiler output into a single line
35656     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35657     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35658         $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
35659   else
35660       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
35661   fi
35662   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
35663   CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
35664   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
35665   CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
35666 
35667   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
35668 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
35669 
35670 
35671   # Now that we have resolved CXX ourself, let autoconf have its go at it
35672   ac_ext=cpp
35673 ac_cpp='$CXXCPP $CPPFLAGS'
35674 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35675 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35676 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35677 if test -z "$CXX"; then
35678   if test -n "$CCC"; then
35679     CXX=$CCC
35680   else
35681     if test -n "$ac_tool_prefix"; then
35682   for ac_prog in $CXX
35683   do
35684     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35685 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35687 $as_echo_n "checking for $ac_word... " >&6; }
35688 if ${ac_cv_prog_CXX+:} false; then :
35689   $as_echo_n "(cached) " >&6
35690 else
35691   if test -n "$CXX"; then
35692   ac_cv_prog_CXX="$CXX" # Let the user override the test.
35693 else
35694 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35695 for as_dir in $PATH
35696 do
35697   IFS=$as_save_IFS
35698   test -z "$as_dir" && as_dir=.
35699     for ac_exec_ext in '' $ac_executable_extensions; do
35700   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35701     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
35702     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35703     break 2
35704   fi
35705 done
35706   done
35707 IFS=$as_save_IFS
35708 
35709 fi
35710 fi
35711 CXX=$ac_cv_prog_CXX
35712 if test -n "$CXX"; then
35713   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
35714 $as_echo "$CXX" >&6; }
35715 else
35716   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35717 $as_echo "no" >&6; }
35718 fi
35719 
35720 
35721     test -n "$CXX" && break
35722   done
35723 fi
35724 if test -z "$CXX"; then
35725   ac_ct_CXX=$CXX
35726   for ac_prog in $CXX
35727 do
35728   # Extract the first word of "$ac_prog", so it can be a program name with args.
35729 set dummy $ac_prog; ac_word=$2
35730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35731 $as_echo_n "checking for $ac_word... " >&6; }
35732 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
35733   $as_echo_n "(cached) " >&6
35734 else
35735   if test -n "$ac_ct_CXX"; then
35736   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
35737 else
35738 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35739 for as_dir in $PATH
35740 do
35741   IFS=$as_save_IFS
35742   test -z "$as_dir" && as_dir=.
35743     for ac_exec_ext in '' $ac_executable_extensions; do
35744   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35745     ac_cv_prog_ac_ct_CXX="$ac_prog"
35746     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35747     break 2
35748   fi
35749 done
35750   done
35751 IFS=$as_save_IFS
35752 
35753 fi
35754 fi
35755 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
35756 if test -n "$ac_ct_CXX"; then
35757   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
35758 $as_echo "$ac_ct_CXX" >&6; }
35759 else
35760   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35761 $as_echo "no" >&6; }
35762 fi
35763 
35764 
35765   test -n "$ac_ct_CXX" && break
35766 done
35767 
35768   if test "x$ac_ct_CXX" = x; then
35769     CXX="g++"
35770   else
35771     case $cross_compiling:$ac_tool_warned in
35772 yes:)
35773 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35774 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35775 ac_tool_warned=yes ;;
35776 esac
35777     CXX=$ac_ct_CXX
35778   fi
35779 fi
35780 
35781   fi
35782 fi
35783 # Provide some information about the compiler.
35784 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
35785 set X $ac_compile
35786 ac_compiler=$2
35787 for ac_option in --version -v -V -qversion; do
35788   { { ac_try="$ac_compiler $ac_option >&5"
35789 case "(($ac_try" in
35790   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35791   *) ac_try_echo=$ac_try;;
35792 esac
35793 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
35794 $as_echo "$ac_try_echo"; } >&5
35795   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
35796   ac_status=$?
35797   if test -s conftest.err; then
35798     sed '10a\
35799 ... rest of stderr output deleted ...
35800          10q' conftest.err >conftest.er1
35801     cat conftest.er1 >&5
35802   fi
35803   rm -f conftest.er1 conftest.err
35804   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35805   test $ac_status = 0; }
35806 done
35807 
35808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
35809 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
35810 if ${ac_cv_cxx_compiler_gnu+:} false; then :
35811   $as_echo_n "(cached) " >&6
35812 else
35813   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35814 /* end confdefs.h.  */
35815 
35816 int
35817 main ()
35818 {
35819 #ifndef __GNUC__
35820        choke me
35821 #endif
35822 
35823   ;
35824   return 0;
35825 }
35826 _ACEOF
35827 if ac_fn_cxx_try_compile "$LINENO"; then :
35828   ac_compiler_gnu=yes
35829 else
35830   ac_compiler_gnu=no
35831 fi
35832 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35833 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
35834 
35835 fi
35836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
35837 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
35838 if test $ac_compiler_gnu = yes; then
35839   GXX=yes
35840 else
35841   GXX=
35842 fi
35843 ac_test_CXXFLAGS=${CXXFLAGS+set}
35844 ac_save_CXXFLAGS=$CXXFLAGS
35845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
35846 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
35847 if ${ac_cv_prog_cxx_g+:} false; then :
35848   $as_echo_n "(cached) " >&6
35849 else
35850   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
35851    ac_cxx_werror_flag=yes
35852    ac_cv_prog_cxx_g=no
35853    CXXFLAGS="-g"
35854    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35855 /* end confdefs.h.  */
35856 
35857 int
35858 main ()
35859 {
35860 
35861   ;
35862   return 0;
35863 }
35864 _ACEOF
35865 if ac_fn_cxx_try_compile "$LINENO"; then :
35866   ac_cv_prog_cxx_g=yes
35867 else
35868   CXXFLAGS=""
35869       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35870 /* end confdefs.h.  */
35871 
35872 int
35873 main ()
35874 {
35875 
35876   ;
35877   return 0;
35878 }
35879 _ACEOF
35880 if ac_fn_cxx_try_compile "$LINENO"; then :
35881 
35882 else
35883   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35884          CXXFLAGS="-g"
35885          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35886 /* end confdefs.h.  */
35887 
35888 int
35889 main ()
35890 {
35891 
35892   ;
35893   return 0;
35894 }
35895 _ACEOF
35896 if ac_fn_cxx_try_compile "$LINENO"; then :
35897   ac_cv_prog_cxx_g=yes
35898 fi
35899 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35900 fi
35901 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35902 fi
35903 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35904    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35905 fi
35906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
35907 $as_echo "$ac_cv_prog_cxx_g" >&6; }
35908 if test "$ac_test_CXXFLAGS" = set; then
35909   CXXFLAGS=$ac_save_CXXFLAGS
35910 elif test $ac_cv_prog_cxx_g = yes; then
35911   if test "$GXX" = yes; then
35912     CXXFLAGS="-g -O2"
35913   else
35914     CXXFLAGS="-g"
35915   fi
35916 else
35917   if test "$GXX" = yes; then
35918     CXXFLAGS="-O2"
35919   else
35920     CXXFLAGS=
35921   fi
35922 fi
35923 ac_ext=cpp
35924 ac_cpp='$CXXCPP $CPPFLAGS'
35925 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35926 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35927 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35928 
35929 
35930   # This is the compiler version number on the form X.Y[.Z]
35931 
35932 
35933 
35934 
35935   if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
35936     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
35937 $as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
35938     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
35939 $as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
35940   fi
35941 
35942   # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
35943   if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
35944     { $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
35945 $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;}
35946   fi
35947 
35948   if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
35949     { $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
35950 $as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
35951   fi
35952 
35953   COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
35954 
35955 
35956   if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
35957 
35958 
35959 
35960 
35961 
35962 
35963 
35964 
35965 
35966 
35967 
35968 
35969 
35970 
35971 
35972 
35973 
35974 
35975 
35976 
35977 
35978 
35979 
35980 
35981 
35982 
35983 
35984 
35985 
35986 
35987 
35988 
35989 
35990 
35991 
35992 
35993 
35994 
35995 
35996 
35997 
35998 
35999 
36000 
36001 
36002 
36003 
36004 
36005 
36006     # Execute function body
36007 
36008   # Need to assign to a variable since m4 is blocked from modifying parts in [].
36009   REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
36010 
36011   if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
36012     as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
36013   fi
36014 
36015   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
36016     as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
36017   fi
36018 
36019   # Version comparison method inspired by http://stackoverflow.com/a/24067243
36020   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
36021 
36022   if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
36023     :
36024 
36025   else
36026     :
36027 
36028           { $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
36029 $as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
36030 
36031 
36032   fi
36033 
36034 
36035 
36036 
36037 
36038 
36039 
36040 
36041 
36042 
36043 
36044 
36045 
36046 
36047   fi
36048 
36049   #
36050   # Setup the preprocessor (CPP and CXXCPP)
36051   #
36052   ac_ext=c
36053 ac_cpp='$CPP $CPPFLAGS'
36054 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36055 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36056 ac_compiler_gnu=$ac_cv_c_compiler_gnu
36057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
36058 $as_echo_n "checking how to run the C preprocessor... " >&6; }
36059 # On Suns, sometimes $CPP names a directory.
36060 if test -n "$CPP" && test -d "$CPP"; then
36061   CPP=
36062 fi
36063 if test -z "$CPP"; then
36064   if ${ac_cv_prog_CPP+:} false; then :
36065   $as_echo_n "(cached) " >&6
36066 else
36067       # Double quotes because CPP needs to be expanded
36068     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
36069     do
36070       ac_preproc_ok=false
36071 for ac_c_preproc_warn_flag in '' yes
36072 do
36073   # Use a header file that comes with gcc, so configuring glibc
36074   # with a fresh cross-compiler works.
36075   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36076   # <limits.h> exists even on freestanding compilers.
36077   # On the NeXT, cc -E runs the code through the compiler's parser,
36078   # not just through cpp. "Syntax error" is here to catch this case.
36079   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36080 /* end confdefs.h.  */
36081 #ifdef __STDC__
36082 # include <limits.h>
36083 #else
36084 # include <assert.h>
36085 #endif
36086                      Syntax error
36087 _ACEOF
36088 if ac_fn_c_try_cpp "$LINENO"; then :
36089 
36090 else
36091   # Broken: fails on valid input.
36092 continue
36093 fi
36094 rm -f conftest.err conftest.i conftest.$ac_ext
36095 
36096   # OK, works on sane cases.  Now check whether nonexistent headers
36097   # can be detected and how.
36098   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36099 /* end confdefs.h.  */
36100 #include <ac_nonexistent.h>
36101 _ACEOF
36102 if ac_fn_c_try_cpp "$LINENO"; then :
36103   # Broken: success on invalid input.
36104 continue
36105 else
36106   # Passes both tests.
36107 ac_preproc_ok=:
36108 break
36109 fi
36110 rm -f conftest.err conftest.i conftest.$ac_ext
36111 
36112 done
36113 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36114 rm -f conftest.i conftest.err conftest.$ac_ext
36115 if $ac_preproc_ok; then :
36116   break
36117 fi
36118 
36119     done
36120     ac_cv_prog_CPP=$CPP
36121 
36122 fi
36123   CPP=$ac_cv_prog_CPP
36124 else
36125   ac_cv_prog_CPP=$CPP
36126 fi
36127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
36128 $as_echo "$CPP" >&6; }
36129 ac_preproc_ok=false
36130 for ac_c_preproc_warn_flag in '' yes
36131 do
36132   # Use a header file that comes with gcc, so configuring glibc
36133   # with a fresh cross-compiler works.
36134   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36135   # <limits.h> exists even on freestanding compilers.
36136   # On the NeXT, cc -E runs the code through the compiler's parser,
36137   # not just through cpp. "Syntax error" is here to catch this case.
36138   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36139 /* end confdefs.h.  */
36140 #ifdef __STDC__
36141 # include <limits.h>
36142 #else
36143 # include <assert.h>
36144 #endif
36145                      Syntax error
36146 _ACEOF
36147 if ac_fn_c_try_cpp "$LINENO"; then :
36148 
36149 else
36150   # Broken: fails on valid input.
36151 continue
36152 fi
36153 rm -f conftest.err conftest.i conftest.$ac_ext
36154 
36155   # OK, works on sane cases.  Now check whether nonexistent headers
36156   # can be detected and how.
36157   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36158 /* end confdefs.h.  */
36159 #include <ac_nonexistent.h>
36160 _ACEOF
36161 if ac_fn_c_try_cpp "$LINENO"; then :
36162   # Broken: success on invalid input.
36163 continue
36164 else
36165   # Passes both tests.
36166 ac_preproc_ok=:
36167 break
36168 fi
36169 rm -f conftest.err conftest.i conftest.$ac_ext
36170 
36171 done
36172 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36173 rm -f conftest.i conftest.err conftest.$ac_ext
36174 if $ac_preproc_ok; then :
36175 
36176 else
36177   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
36178 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
36179 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
36180 See \`config.log' for more details" "$LINENO" 5; }
36181 fi
36182 
36183 ac_ext=cpp
36184 ac_cpp='$CXXCPP $CPPFLAGS'
36185 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36186 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36187 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36188 
36189 
36190   # Only process if variable expands to non-empty
36191 
36192   if test "x$CPP" != x; then
36193     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36194 
36195   # First separate the path from the arguments. This will split at the first
36196   # space.
36197   complete="$CPP"
36198   path="${complete%% *}"
36199   tmp="$complete EOL"
36200   arguments="${tmp#* }"
36201 
36202   # Input might be given as Windows format, start by converting to
36203   # unix format.
36204   new_path=`$CYGPATH -u "$path"`
36205 
36206   # Now try to locate executable using which
36207   new_path=`$WHICH "$new_path" 2> /dev/null`
36208   # bat and cmd files are not always considered executable in cygwin causing which
36209   # to not find them
36210   if test "x$new_path" = x \
36211       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36212       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36213     new_path=`$CYGPATH -u "$path"`
36214   fi
36215   if test "x$new_path" = x; then
36216     # Oops. Which didn't find the executable.
36217     # The splitting of arguments from the executable at a space might have been incorrect,
36218     # since paths with space are more likely in Windows. Give it another try with the whole
36219     # argument.
36220     path="$complete"
36221     arguments="EOL"
36222     new_path=`$CYGPATH -u "$path"`
36223     new_path=`$WHICH "$new_path" 2> /dev/null`
36224     # bat and cmd files are not always considered executable in cygwin causing which
36225     # to not find them
36226     if test "x$new_path" = x \
36227         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36228         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36229       new_path=`$CYGPATH -u "$path"`
36230     fi
36231     if test "x$new_path" = x; then
36232       # It's still not found. Now this is an unrecoverable error.
36233       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36234 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36235       has_space=`$ECHO "$complete" | $GREP " "`
36236       if test "x$has_space" != x; then
36237         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36238 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36239       fi
36240       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36241     fi
36242   fi
36243 
36244   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36245   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36246   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36247   # "foo.exe" is OK but "foo" is an error.
36248   #
36249   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36250   # It is also a way to make sure we got the proper file name for the real test later on.
36251   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36252   if test "x$test_shortpath" = x; then
36253     # Short path failed, file does not exist as specified.
36254     # Try adding .exe or .cmd
36255     if test -f "${new_path}.exe"; then
36256       input_to_shortpath="${new_path}.exe"
36257     elif test -f "${new_path}.cmd"; then
36258       input_to_shortpath="${new_path}.cmd"
36259     else
36260       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
36261 $as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
36262       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36263 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36264       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36265     fi
36266   else
36267     input_to_shortpath="$new_path"
36268   fi
36269 
36270   # Call helper function which possibly converts this using DOS-style short mode.
36271   # If so, the updated path is stored in $new_path.
36272   new_path="$input_to_shortpath"
36273 
36274   input_path="$input_to_shortpath"
36275   # Check if we need to convert this using DOS-style short mode. If the path
36276   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36277   # take no chances and rewrite it.
36278   # Note: m4 eats our [], so we need to use [ and ] instead.
36279   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36280   if test "x$has_forbidden_chars" != x; then
36281     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36282     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36283     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36284     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36285       # Going to short mode and back again did indeed matter. Since short mode is
36286       # case insensitive, let's make it lowercase to improve readability.
36287       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36288       # Now convert it back to Unix-style (cygpath)
36289       input_path=`$CYGPATH -u "$shortmode_path"`
36290       new_path="$input_path"
36291     fi
36292   fi
36293 
36294   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36295   if test "x$test_cygdrive_prefix" = x; then
36296     # As a simple fix, exclude /usr/bin since it's not a real path.
36297     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36298       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36299       # a path prefixed by /cygdrive for fixpath to work.
36300       new_path="$CYGWIN_ROOT_PATH$input_path"
36301     fi
36302   fi
36303 
36304   # remove trailing .exe if any
36305   new_path="${new_path/%.exe/}"
36306 
36307     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36308 
36309   # First separate the path from the arguments. This will split at the first
36310   # space.
36311   complete="$CPP"
36312   path="${complete%% *}"
36313   tmp="$complete EOL"
36314   arguments="${tmp#* }"
36315 
36316   # Input might be given as Windows format, start by converting to
36317   # unix format.
36318   new_path="$path"
36319 
36320   windows_path="$new_path"
36321   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36322     unix_path=`$CYGPATH -u "$windows_path"`
36323     new_path="$unix_path"
36324   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36325     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36326     new_path="$unix_path"
36327   fi
36328 
36329 
36330   # Now try to locate executable using which
36331   new_path=`$WHICH "$new_path" 2> /dev/null`
36332 
36333   if test "x$new_path" = x; then
36334     # Oops. Which didn't find the executable.
36335     # The splitting of arguments from the executable at a space might have been incorrect,
36336     # since paths with space are more likely in Windows. Give it another try with the whole
36337     # argument.
36338     path="$complete"
36339     arguments="EOL"
36340     new_path="$path"
36341 
36342   windows_path="$new_path"
36343   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36344     unix_path=`$CYGPATH -u "$windows_path"`
36345     new_path="$unix_path"
36346   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36347     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36348     new_path="$unix_path"
36349   fi
36350 
36351 
36352     new_path=`$WHICH "$new_path" 2> /dev/null`
36353     # bat and cmd files are not always considered executable in MSYS causing which
36354     # to not find them
36355     if test "x$new_path" = x \
36356         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36357         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36358       new_path="$path"
36359 
36360   windows_path="$new_path"
36361   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36362     unix_path=`$CYGPATH -u "$windows_path"`
36363     new_path="$unix_path"
36364   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36365     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36366     new_path="$unix_path"
36367   fi
36368 
36369     fi
36370 
36371     if test "x$new_path" = x; then
36372       # It's still not found. Now this is an unrecoverable error.
36373       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36374 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36375       has_space=`$ECHO "$complete" | $GREP " "`
36376       if test "x$has_space" != x; then
36377         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36378 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36379       fi
36380       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36381     fi
36382   fi
36383 
36384   # Now new_path has a complete unix path to the binary
36385   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36386     # Keep paths in /bin as-is, but remove trailing .exe if any
36387     new_path="${new_path/%.exe/}"
36388     # Do not save /bin paths to all_fixpath_prefixes!
36389   else
36390     # Not in mixed or Windows style, start by that.
36391     new_path=`cmd //c echo $new_path`
36392 
36393   input_path="$new_path"
36394   # Check if we need to convert this using DOS-style short mode. If the path
36395   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36396   # take no chances and rewrite it.
36397   # Note: m4 eats our [], so we need to use [ and ] instead.
36398   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36399   if test "x$has_forbidden_chars" != x; then
36400     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36401     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36402   fi
36403 
36404     # Output is in $new_path
36405 
36406   windows_path="$new_path"
36407   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36408     unix_path=`$CYGPATH -u "$windows_path"`
36409     new_path="$unix_path"
36410   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36411     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36412     new_path="$unix_path"
36413   fi
36414 
36415     # remove trailing .exe if any
36416     new_path="${new_path/%.exe/}"
36417 
36418     # Save the first 10 bytes of this path to the storage, so fixpath can work.
36419     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36420   fi
36421 
36422     else
36423       # We're on a unix platform. Hooray! :)
36424       # First separate the path from the arguments. This will split at the first
36425       # space.
36426       complete="$CPP"
36427       path="${complete%% *}"
36428       tmp="$complete EOL"
36429       arguments="${tmp#* }"
36430 
36431       # Cannot rely on the command "which" here since it doesn't always work.
36432       is_absolute_path=`$ECHO "$path" | $GREP ^/`
36433       if test -z "$is_absolute_path"; then
36434         # Path to executable is not absolute. Find it.
36435         IFS_save="$IFS"
36436         IFS=:
36437         for p in $PATH; do
36438           if test -f "$p/$path" && test -x "$p/$path"; then
36439             new_path="$p/$path"
36440             break
36441           fi
36442         done
36443         IFS="$IFS_save"
36444       else
36445         # This is an absolute path, we can use it without further modifications.
36446         new_path="$path"
36447       fi
36448 
36449       if test "x$new_path" = x; then
36450         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36451 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36452         has_space=`$ECHO "$complete" | $GREP " "`
36453         if test "x$has_space" != x; then
36454           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36455 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36456         fi
36457         as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36458       fi
36459     fi
36460 
36461     # Now join together the path and the arguments once again
36462     if test "x$arguments" != xEOL; then
36463       new_complete="$new_path ${arguments% *}"
36464     else
36465       new_complete="$new_path"
36466     fi
36467 
36468     if test "x$complete" != "x$new_complete"; then
36469       CPP="$new_complete"
36470       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
36471 $as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
36472     fi
36473   fi
36474 
36475   ac_ext=cpp
36476 ac_cpp='$CXXCPP $CPPFLAGS'
36477 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36478 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36479 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
36481 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
36482 if test -z "$CXXCPP"; then
36483   if ${ac_cv_prog_CXXCPP+:} false; then :
36484   $as_echo_n "(cached) " >&6
36485 else
36486       # Double quotes because CXXCPP needs to be expanded
36487     for CXXCPP in "$CXX -E" "/lib/cpp"
36488     do
36489       ac_preproc_ok=false
36490 for ac_cxx_preproc_warn_flag in '' yes
36491 do
36492   # Use a header file that comes with gcc, so configuring glibc
36493   # with a fresh cross-compiler works.
36494   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36495   # <limits.h> exists even on freestanding compilers.
36496   # On the NeXT, cc -E runs the code through the compiler's parser,
36497   # not just through cpp. "Syntax error" is here to catch this case.
36498   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36499 /* end confdefs.h.  */
36500 #ifdef __STDC__
36501 # include <limits.h>
36502 #else
36503 # include <assert.h>
36504 #endif
36505                      Syntax error
36506 _ACEOF
36507 if ac_fn_cxx_try_cpp "$LINENO"; then :
36508 
36509 else
36510   # Broken: fails on valid input.
36511 continue
36512 fi
36513 rm -f conftest.err conftest.i conftest.$ac_ext
36514 
36515   # OK, works on sane cases.  Now check whether nonexistent headers
36516   # can be detected and how.
36517   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36518 /* end confdefs.h.  */
36519 #include <ac_nonexistent.h>
36520 _ACEOF
36521 if ac_fn_cxx_try_cpp "$LINENO"; then :
36522   # Broken: success on invalid input.
36523 continue
36524 else
36525   # Passes both tests.
36526 ac_preproc_ok=:
36527 break
36528 fi
36529 rm -f conftest.err conftest.i conftest.$ac_ext
36530 
36531 done
36532 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36533 rm -f conftest.i conftest.err conftest.$ac_ext
36534 if $ac_preproc_ok; then :
36535   break
36536 fi
36537 
36538     done
36539     ac_cv_prog_CXXCPP=$CXXCPP
36540 
36541 fi
36542   CXXCPP=$ac_cv_prog_CXXCPP
36543 else
36544   ac_cv_prog_CXXCPP=$CXXCPP
36545 fi
36546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
36547 $as_echo "$CXXCPP" >&6; }
36548 ac_preproc_ok=false
36549 for ac_cxx_preproc_warn_flag in '' yes
36550 do
36551   # Use a header file that comes with gcc, so configuring glibc
36552   # with a fresh cross-compiler works.
36553   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36554   # <limits.h> exists even on freestanding compilers.
36555   # On the NeXT, cc -E runs the code through the compiler's parser,
36556   # not just through cpp. "Syntax error" is here to catch this case.
36557   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36558 /* end confdefs.h.  */
36559 #ifdef __STDC__
36560 # include <limits.h>
36561 #else
36562 # include <assert.h>
36563 #endif
36564                      Syntax error
36565 _ACEOF
36566 if ac_fn_cxx_try_cpp "$LINENO"; then :
36567 
36568 else
36569   # Broken: fails on valid input.
36570 continue
36571 fi
36572 rm -f conftest.err conftest.i conftest.$ac_ext
36573 
36574   # OK, works on sane cases.  Now check whether nonexistent headers
36575   # can be detected and how.
36576   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36577 /* end confdefs.h.  */
36578 #include <ac_nonexistent.h>
36579 _ACEOF
36580 if ac_fn_cxx_try_cpp "$LINENO"; then :
36581   # Broken: success on invalid input.
36582 continue
36583 else
36584   # Passes both tests.
36585 ac_preproc_ok=:
36586 break
36587 fi
36588 rm -f conftest.err conftest.i conftest.$ac_ext
36589 
36590 done
36591 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36592 rm -f conftest.i conftest.err conftest.$ac_ext
36593 if $ac_preproc_ok; then :
36594 
36595 else
36596   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
36597 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
36598 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
36599 See \`config.log' for more details" "$LINENO" 5; }
36600 fi
36601 
36602 ac_ext=cpp
36603 ac_cpp='$CXXCPP $CPPFLAGS'
36604 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36605 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36606 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36607 
36608 
36609   # Only process if variable expands to non-empty
36610 
36611   if test "x$CXXCPP" != x; then
36612     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36613 
36614   # First separate the path from the arguments. This will split at the first
36615   # space.
36616   complete="$CXXCPP"
36617   path="${complete%% *}"
36618   tmp="$complete EOL"
36619   arguments="${tmp#* }"
36620 
36621   # Input might be given as Windows format, start by converting to
36622   # unix format.
36623   new_path=`$CYGPATH -u "$path"`
36624 
36625   # Now try to locate executable using which
36626   new_path=`$WHICH "$new_path" 2> /dev/null`
36627   # bat and cmd files are not always considered executable in cygwin causing which
36628   # to not find them
36629   if test "x$new_path" = x \
36630       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36631       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36632     new_path=`$CYGPATH -u "$path"`
36633   fi
36634   if test "x$new_path" = x; then
36635     # Oops. Which didn't find the executable.
36636     # The splitting of arguments from the executable at a space might have been incorrect,
36637     # since paths with space are more likely in Windows. Give it another try with the whole
36638     # argument.
36639     path="$complete"
36640     arguments="EOL"
36641     new_path=`$CYGPATH -u "$path"`
36642     new_path=`$WHICH "$new_path" 2> /dev/null`
36643     # bat and cmd files are not always considered executable in cygwin causing which
36644     # to not find them
36645     if test "x$new_path" = x \
36646         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36647         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36648       new_path=`$CYGPATH -u "$path"`
36649     fi
36650     if test "x$new_path" = x; then
36651       # It's still not found. Now this is an unrecoverable error.
36652       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36653 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36654       has_space=`$ECHO "$complete" | $GREP " "`
36655       if test "x$has_space" != x; then
36656         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36657 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36658       fi
36659       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36660     fi
36661   fi
36662 
36663   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36664   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36665   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36666   # "foo.exe" is OK but "foo" is an error.
36667   #
36668   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36669   # It is also a way to make sure we got the proper file name for the real test later on.
36670   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36671   if test "x$test_shortpath" = x; then
36672     # Short path failed, file does not exist as specified.
36673     # Try adding .exe or .cmd
36674     if test -f "${new_path}.exe"; then
36675       input_to_shortpath="${new_path}.exe"
36676     elif test -f "${new_path}.cmd"; then
36677       input_to_shortpath="${new_path}.cmd"
36678     else
36679       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
36680 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
36681       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36682 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36683       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36684     fi
36685   else
36686     input_to_shortpath="$new_path"
36687   fi
36688 
36689   # Call helper function which possibly converts this using DOS-style short mode.
36690   # If so, the updated path is stored in $new_path.
36691   new_path="$input_to_shortpath"
36692 
36693   input_path="$input_to_shortpath"
36694   # Check if we need to convert this using DOS-style short mode. If the path
36695   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36696   # take no chances and rewrite it.
36697   # Note: m4 eats our [], so we need to use [ and ] instead.
36698   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36699   if test "x$has_forbidden_chars" != x; then
36700     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36701     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36702     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36703     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36704       # Going to short mode and back again did indeed matter. Since short mode is
36705       # case insensitive, let's make it lowercase to improve readability.
36706       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36707       # Now convert it back to Unix-style (cygpath)
36708       input_path=`$CYGPATH -u "$shortmode_path"`
36709       new_path="$input_path"
36710     fi
36711   fi
36712 
36713   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36714   if test "x$test_cygdrive_prefix" = x; then
36715     # As a simple fix, exclude /usr/bin since it's not a real path.
36716     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36717       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36718       # a path prefixed by /cygdrive for fixpath to work.
36719       new_path="$CYGWIN_ROOT_PATH$input_path"
36720     fi
36721   fi
36722 
36723   # remove trailing .exe if any
36724   new_path="${new_path/%.exe/}"
36725 
36726     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36727 
36728   # First separate the path from the arguments. This will split at the first
36729   # space.
36730   complete="$CXXCPP"
36731   path="${complete%% *}"
36732   tmp="$complete EOL"
36733   arguments="${tmp#* }"
36734 
36735   # Input might be given as Windows format, start by converting to
36736   # unix format.
36737   new_path="$path"
36738 
36739   windows_path="$new_path"
36740   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36741     unix_path=`$CYGPATH -u "$windows_path"`
36742     new_path="$unix_path"
36743   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36744     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36745     new_path="$unix_path"
36746   fi
36747 
36748 
36749   # Now try to locate executable using which
36750   new_path=`$WHICH "$new_path" 2> /dev/null`
36751 
36752   if test "x$new_path" = x; then
36753     # Oops. Which didn't find the executable.
36754     # The splitting of arguments from the executable at a space might have been incorrect,
36755     # since paths with space are more likely in Windows. Give it another try with the whole
36756     # argument.
36757     path="$complete"
36758     arguments="EOL"
36759     new_path="$path"
36760 
36761   windows_path="$new_path"
36762   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36763     unix_path=`$CYGPATH -u "$windows_path"`
36764     new_path="$unix_path"
36765   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36766     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36767     new_path="$unix_path"
36768   fi
36769 
36770 
36771     new_path=`$WHICH "$new_path" 2> /dev/null`
36772     # bat and cmd files are not always considered executable in MSYS causing which
36773     # to not find them
36774     if test "x$new_path" = x \
36775         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36776         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36777       new_path="$path"
36778 
36779   windows_path="$new_path"
36780   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36781     unix_path=`$CYGPATH -u "$windows_path"`
36782     new_path="$unix_path"
36783   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36784     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36785     new_path="$unix_path"
36786   fi
36787 
36788     fi
36789 
36790     if test "x$new_path" = x; then
36791       # It's still not found. Now this is an unrecoverable error.
36792       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36793 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36794       has_space=`$ECHO "$complete" | $GREP " "`
36795       if test "x$has_space" != x; then
36796         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36797 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36798       fi
36799       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36800     fi
36801   fi
36802 
36803   # Now new_path has a complete unix path to the binary
36804   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36805     # Keep paths in /bin as-is, but remove trailing .exe if any
36806     new_path="${new_path/%.exe/}"
36807     # Do not save /bin paths to all_fixpath_prefixes!
36808   else
36809     # Not in mixed or Windows style, start by that.
36810     new_path=`cmd //c echo $new_path`
36811 
36812   input_path="$new_path"
36813   # Check if we need to convert this using DOS-style short mode. If the path
36814   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36815   # take no chances and rewrite it.
36816   # Note: m4 eats our [], so we need to use [ and ] instead.
36817   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36818   if test "x$has_forbidden_chars" != x; then
36819     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36820     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36821   fi
36822 
36823     # Output is in $new_path
36824 
36825   windows_path="$new_path"
36826   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36827     unix_path=`$CYGPATH -u "$windows_path"`
36828     new_path="$unix_path"
36829   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36830     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36831     new_path="$unix_path"
36832   fi
36833 
36834     # remove trailing .exe if any
36835     new_path="${new_path/%.exe/}"
36836 
36837     # Save the first 10 bytes of this path to the storage, so fixpath can work.
36838     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36839   fi
36840 
36841     else
36842       # We're on a unix platform. Hooray! :)
36843       # First separate the path from the arguments. This will split at the first
36844       # space.
36845       complete="$CXXCPP"
36846       path="${complete%% *}"
36847       tmp="$complete EOL"
36848       arguments="${tmp#* }"
36849 
36850       # Cannot rely on the command "which" here since it doesn't always work.
36851       is_absolute_path=`$ECHO "$path" | $GREP ^/`
36852       if test -z "$is_absolute_path"; then
36853         # Path to executable is not absolute. Find it.
36854         IFS_save="$IFS"
36855         IFS=:
36856         for p in $PATH; do
36857           if test -f "$p/$path" && test -x "$p/$path"; then
36858             new_path="$p/$path"
36859             break
36860           fi
36861         done
36862         IFS="$IFS_save"
36863       else
36864         # This is an absolute path, we can use it without further modifications.
36865         new_path="$path"
36866       fi
36867 
36868       if test "x$new_path" = x; then
36869         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36870 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36871         has_space=`$ECHO "$complete" | $GREP " "`
36872         if test "x$has_space" != x; then
36873           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36874 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36875         fi
36876         as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36877       fi
36878     fi
36879 
36880     # Now join together the path and the arguments once again
36881     if test "x$arguments" != xEOL; then
36882       new_complete="$new_path ${arguments% *}"
36883     else
36884       new_complete="$new_path"
36885     fi
36886 
36887     if test "x$complete" != "x$new_complete"; then
36888       CXXCPP="$new_complete"
36889       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
36890 $as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
36891     fi
36892   fi
36893 
36894 
36895   #
36896   # Setup the linker (LD)
36897   #
36898   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36899     # In the Microsoft toolchain we have a separate LD command "link".
36900     # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
36901     # a cygwin program for something completely different.
36902     # Extract the first word of "link", so it can be a program name with args.
36903 set dummy link; ac_word=$2
36904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36905 $as_echo_n "checking for $ac_word... " >&6; }
36906 if ${ac_cv_prog_LD+:} false; then :
36907   $as_echo_n "(cached) " >&6
36908 else
36909   if test -n "$LD"; then
36910   ac_cv_prog_LD="$LD" # Let the user override the test.
36911 else
36912   ac_prog_rejected=no
36913 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36914 for as_dir in $PATH
36915 do
36916   IFS=$as_save_IFS
36917   test -z "$as_dir" && as_dir=.
36918     for ac_exec_ext in '' $ac_executable_extensions; do
36919   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36920     if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
36921        ac_prog_rejected=yes
36922        continue
36923      fi
36924     ac_cv_prog_LD="link"
36925     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36926     break 2
36927   fi
36928 done
36929   done
36930 IFS=$as_save_IFS
36931 
36932 if test $ac_prog_rejected = yes; then
36933   # We found a bogon in the path, so make sure we never use it.
36934   set dummy $ac_cv_prog_LD
36935   shift
36936   if test $# != 0; then
36937     # We chose a different compiler from the bogus one.
36938     # However, it has the same basename, so the bogon will be chosen
36939     # first if we set LD to just the basename; use the full file name.
36940     shift
36941     ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
36942   fi
36943 fi
36944 fi
36945 fi
36946 LD=$ac_cv_prog_LD
36947 if test -n "$LD"; then
36948   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
36949 $as_echo "$LD" >&6; }
36950 else
36951   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36952 $as_echo "no" >&6; }
36953 fi
36954 
36955 
36956 
36957   # Only process if variable expands to non-empty
36958 
36959   if test "x$LD" != x; then
36960     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36961 
36962   # First separate the path from the arguments. This will split at the first
36963   # space.
36964   complete="$LD"
36965   path="${complete%% *}"
36966   tmp="$complete EOL"
36967   arguments="${tmp#* }"
36968 
36969   # Input might be given as Windows format, start by converting to
36970   # unix format.
36971   new_path=`$CYGPATH -u "$path"`
36972 
36973   # Now try to locate executable using which
36974   new_path=`$WHICH "$new_path" 2> /dev/null`
36975   # bat and cmd files are not always considered executable in cygwin causing which
36976   # to not find them
36977   if test "x$new_path" = x \
36978       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36979       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36980     new_path=`$CYGPATH -u "$path"`
36981   fi
36982   if test "x$new_path" = x; then
36983     # Oops. Which didn't find the executable.
36984     # The splitting of arguments from the executable at a space might have been incorrect,
36985     # since paths with space are more likely in Windows. Give it another try with the whole
36986     # argument.
36987     path="$complete"
36988     arguments="EOL"
36989     new_path=`$CYGPATH -u "$path"`
36990     new_path=`$WHICH "$new_path" 2> /dev/null`
36991     # bat and cmd files are not always considered executable in cygwin causing which
36992     # to not find them
36993     if test "x$new_path" = x \
36994         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36995         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36996       new_path=`$CYGPATH -u "$path"`
36997     fi
36998     if test "x$new_path" = x; then
36999       # It's still not found. Now this is an unrecoverable error.
37000       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37001 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37002       has_space=`$ECHO "$complete" | $GREP " "`
37003       if test "x$has_space" != x; then
37004         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37005 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37006       fi
37007       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37008     fi
37009   fi
37010 
37011   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37012   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37013   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37014   # "foo.exe" is OK but "foo" is an error.
37015   #
37016   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37017   # It is also a way to make sure we got the proper file name for the real test later on.
37018   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37019   if test "x$test_shortpath" = x; then
37020     # Short path failed, file does not exist as specified.
37021     # Try adding .exe or .cmd
37022     if test -f "${new_path}.exe"; then
37023       input_to_shortpath="${new_path}.exe"
37024     elif test -f "${new_path}.cmd"; then
37025       input_to_shortpath="${new_path}.cmd"
37026     else
37027       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
37028 $as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
37029       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37030 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37031       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37032     fi
37033   else
37034     input_to_shortpath="$new_path"
37035   fi
37036 
37037   # Call helper function which possibly converts this using DOS-style short mode.
37038   # If so, the updated path is stored in $new_path.
37039   new_path="$input_to_shortpath"
37040 
37041   input_path="$input_to_shortpath"
37042   # Check if we need to convert this using DOS-style short mode. If the path
37043   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37044   # take no chances and rewrite it.
37045   # Note: m4 eats our [], so we need to use [ and ] instead.
37046   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37047   if test "x$has_forbidden_chars" != x; then
37048     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37049     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37050     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37051     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37052       # Going to short mode and back again did indeed matter. Since short mode is
37053       # case insensitive, let's make it lowercase to improve readability.
37054       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37055       # Now convert it back to Unix-style (cygpath)
37056       input_path=`$CYGPATH -u "$shortmode_path"`
37057       new_path="$input_path"
37058     fi
37059   fi
37060 
37061   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37062   if test "x$test_cygdrive_prefix" = x; then
37063     # As a simple fix, exclude /usr/bin since it's not a real path.
37064     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37065       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37066       # a path prefixed by /cygdrive for fixpath to work.
37067       new_path="$CYGWIN_ROOT_PATH$input_path"
37068     fi
37069   fi
37070 
37071   # remove trailing .exe if any
37072   new_path="${new_path/%.exe/}"
37073 
37074     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37075 
37076   # First separate the path from the arguments. This will split at the first
37077   # space.
37078   complete="$LD"
37079   path="${complete%% *}"
37080   tmp="$complete EOL"
37081   arguments="${tmp#* }"
37082 
37083   # Input might be given as Windows format, start by converting to
37084   # unix format.
37085   new_path="$path"
37086 
37087   windows_path="$new_path"
37088   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37089     unix_path=`$CYGPATH -u "$windows_path"`
37090     new_path="$unix_path"
37091   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37092     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37093     new_path="$unix_path"
37094   fi
37095 
37096 
37097   # Now try to locate executable using which
37098   new_path=`$WHICH "$new_path" 2> /dev/null`
37099 
37100   if test "x$new_path" = x; then
37101     # Oops. Which didn't find the executable.
37102     # The splitting of arguments from the executable at a space might have been incorrect,
37103     # since paths with space are more likely in Windows. Give it another try with the whole
37104     # argument.
37105     path="$complete"
37106     arguments="EOL"
37107     new_path="$path"
37108 
37109   windows_path="$new_path"
37110   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37111     unix_path=`$CYGPATH -u "$windows_path"`
37112     new_path="$unix_path"
37113   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37114     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37115     new_path="$unix_path"
37116   fi
37117 
37118 
37119     new_path=`$WHICH "$new_path" 2> /dev/null`
37120     # bat and cmd files are not always considered executable in MSYS causing which
37121     # to not find them
37122     if test "x$new_path" = x \
37123         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37124         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37125       new_path="$path"
37126 
37127   windows_path="$new_path"
37128   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37129     unix_path=`$CYGPATH -u "$windows_path"`
37130     new_path="$unix_path"
37131   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37132     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37133     new_path="$unix_path"
37134   fi
37135 
37136     fi
37137 
37138     if test "x$new_path" = x; then
37139       # It's still not found. Now this is an unrecoverable error.
37140       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37141 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37142       has_space=`$ECHO "$complete" | $GREP " "`
37143       if test "x$has_space" != x; then
37144         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37145 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37146       fi
37147       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37148     fi
37149   fi
37150 
37151   # Now new_path has a complete unix path to the binary
37152   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37153     # Keep paths in /bin as-is, but remove trailing .exe if any
37154     new_path="${new_path/%.exe/}"
37155     # Do not save /bin paths to all_fixpath_prefixes!
37156   else
37157     # Not in mixed or Windows style, start by that.
37158     new_path=`cmd //c echo $new_path`
37159 
37160   input_path="$new_path"
37161   # Check if we need to convert this using DOS-style short mode. If the path
37162   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37163   # take no chances and rewrite it.
37164   # Note: m4 eats our [], so we need to use [ and ] instead.
37165   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37166   if test "x$has_forbidden_chars" != x; then
37167     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37168     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37169   fi
37170 
37171     # Output is in $new_path
37172 
37173   windows_path="$new_path"
37174   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37175     unix_path=`$CYGPATH -u "$windows_path"`
37176     new_path="$unix_path"
37177   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37178     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37179     new_path="$unix_path"
37180   fi
37181 
37182     # remove trailing .exe if any
37183     new_path="${new_path/%.exe/}"
37184 
37185     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37186     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37187   fi
37188 
37189     else
37190       # We're on a unix platform. Hooray! :)
37191       # First separate the path from the arguments. This will split at the first
37192       # space.
37193       complete="$LD"
37194       path="${complete%% *}"
37195       tmp="$complete EOL"
37196       arguments="${tmp#* }"
37197 
37198       # Cannot rely on the command "which" here since it doesn't always work.
37199       is_absolute_path=`$ECHO "$path" | $GREP ^/`
37200       if test -z "$is_absolute_path"; then
37201         # Path to executable is not absolute. Find it.
37202         IFS_save="$IFS"
37203         IFS=:
37204         for p in $PATH; do
37205           if test -f "$p/$path" && test -x "$p/$path"; then
37206             new_path="$p/$path"
37207             break
37208           fi
37209         done
37210         IFS="$IFS_save"
37211       else
37212         # This is an absolute path, we can use it without further modifications.
37213         new_path="$path"
37214       fi
37215 
37216       if test "x$new_path" = x; then
37217         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37218 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37219         has_space=`$ECHO "$complete" | $GREP " "`
37220         if test "x$has_space" != x; then
37221           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37222 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37223         fi
37224         as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37225       fi
37226     fi
37227 
37228     # Now join together the path and the arguments once again
37229     if test "x$arguments" != xEOL; then
37230       new_complete="$new_path ${arguments% *}"
37231     else
37232       new_complete="$new_path"
37233     fi
37234 
37235     if test "x$complete" != "x$new_complete"; then
37236       LD="$new_complete"
37237       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
37238 $as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
37239     fi
37240   fi
37241 
37242     # Verify that we indeed succeeded with this trick.
37243     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
37244 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
37245     "$LD" --version > /dev/null
37246     if test $? -eq 0 ; then
37247       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37248 $as_echo "no" >&6; }
37249       as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
37250     else
37251       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37252 $as_echo "yes" >&6; }
37253     fi
37254     LDCXX="$LD"
37255   else
37256     # All other toolchains use the compiler to link.
37257     LD="$CC"
37258     LDCXX="$CXX"
37259   fi
37260 
37261   # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
37262 
37263 
37264   #
37265   # Setup the assembler (AS)
37266   #
37267   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
37268 
37269 
37270   # Publish this variable in the help.
37271 
37272 
37273   if [ -z "${AS+x}" ]; then
37274     # The variable is not set by user, try to locate tool using the code snippet
37275     for ac_prog in as
37276 do
37277   # Extract the first word of "$ac_prog", so it can be a program name with args.
37278 set dummy $ac_prog; ac_word=$2
37279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37280 $as_echo_n "checking for $ac_word... " >&6; }
37281 if ${ac_cv_path_AS+:} false; then :
37282   $as_echo_n "(cached) " >&6
37283 else
37284   case $AS in
37285   [\\/]* | ?:[\\/]*)
37286   ac_cv_path_AS="$AS" # Let the user override the test with a path.
37287   ;;
37288   *)
37289   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37290 for as_dir in $PATH
37291 do
37292   IFS=$as_save_IFS
37293   test -z "$as_dir" && as_dir=.
37294     for ac_exec_ext in '' $ac_executable_extensions; do
37295   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37296     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37297     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37298     break 2
37299   fi
37300 done
37301   done
37302 IFS=$as_save_IFS
37303 
37304   ;;
37305 esac
37306 fi
37307 AS=$ac_cv_path_AS
37308 if test -n "$AS"; then
37309   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37310 $as_echo "$AS" >&6; }
37311 else
37312   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37313 $as_echo "no" >&6; }
37314 fi
37315 
37316 
37317   test -n "$AS" && break
37318 done
37319 
37320   else
37321     # The variable is set, but is it from the command line or the environment?
37322 
37323     # Try to remove the string !AS! from our list.
37324     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
37325     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37326       # If it failed, the variable was not from the command line. Ignore it,
37327       # but warn the user (except for BASH, which is always set by the calling BASH).
37328       if test "xAS" != xBASH; then
37329         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
37330 $as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
37331       fi
37332       # Try to locate tool using the code snippet
37333       for ac_prog in as
37334 do
37335   # Extract the first word of "$ac_prog", so it can be a program name with args.
37336 set dummy $ac_prog; ac_word=$2
37337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37338 $as_echo_n "checking for $ac_word... " >&6; }
37339 if ${ac_cv_path_AS+:} false; then :
37340   $as_echo_n "(cached) " >&6
37341 else
37342   case $AS in
37343   [\\/]* | ?:[\\/]*)
37344   ac_cv_path_AS="$AS" # Let the user override the test with a path.
37345   ;;
37346   *)
37347   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37348 for as_dir in $PATH
37349 do
37350   IFS=$as_save_IFS
37351   test -z "$as_dir" && as_dir=.
37352     for ac_exec_ext in '' $ac_executable_extensions; do
37353   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37354     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37355     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37356     break 2
37357   fi
37358 done
37359   done
37360 IFS=$as_save_IFS
37361 
37362   ;;
37363 esac
37364 fi
37365 AS=$ac_cv_path_AS
37366 if test -n "$AS"; then
37367   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37368 $as_echo "$AS" >&6; }
37369 else
37370   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37371 $as_echo "no" >&6; }
37372 fi
37373 
37374 
37375   test -n "$AS" && break
37376 done
37377 
37378     else
37379       # If it succeeded, then it was overridden by the user. We will use it
37380       # for the tool.
37381 
37382       # First remove it from the list of overridden variables, so we can test
37383       # for unknown variables in the end.
37384       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37385 
37386       # Check if we try to supply an empty value
37387       if test "x$AS" = x; then
37388         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
37389 $as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
37390         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
37391 $as_echo_n "checking for AS... " >&6; }
37392         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37393 $as_echo "disabled" >&6; }
37394       else
37395         # Check if the provided tool contains a complete path.
37396         tool_specified="$AS"
37397         tool_basename="${tool_specified##*/}"
37398         if test "x$tool_basename" = "x$tool_specified"; then
37399           # A command without a complete path is provided, search $PATH.
37400           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
37401 $as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
37402           # Extract the first word of "$tool_basename", so it can be a program name with args.
37403 set dummy $tool_basename; ac_word=$2
37404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37405 $as_echo_n "checking for $ac_word... " >&6; }
37406 if ${ac_cv_path_AS+:} false; then :
37407   $as_echo_n "(cached) " >&6
37408 else
37409   case $AS in
37410   [\\/]* | ?:[\\/]*)
37411   ac_cv_path_AS="$AS" # Let the user override the test with a path.
37412   ;;
37413   *)
37414   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37415 for as_dir in $PATH
37416 do
37417   IFS=$as_save_IFS
37418   test -z "$as_dir" && as_dir=.
37419     for ac_exec_ext in '' $ac_executable_extensions; do
37420   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37421     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37422     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37423     break 2
37424   fi
37425 done
37426   done
37427 IFS=$as_save_IFS
37428 
37429   ;;
37430 esac
37431 fi
37432 AS=$ac_cv_path_AS
37433 if test -n "$AS"; then
37434   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37435 $as_echo "$AS" >&6; }
37436 else
37437   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37438 $as_echo "no" >&6; }
37439 fi
37440 
37441 
37442           if test "x$AS" = x; then
37443             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37444           fi
37445         else
37446           # Otherwise we believe it is a complete path. Use it as it is.
37447           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
37448 $as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
37449           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
37450 $as_echo_n "checking for AS... " >&6; }
37451           if test ! -x "$tool_specified"; then
37452             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37453 $as_echo "not found" >&6; }
37454             as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
37455           fi
37456           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37457 $as_echo "$tool_specified" >&6; }
37458         fi
37459       fi
37460     fi
37461 
37462   fi
37463 
37464 
37465 
37466   # Only process if variable expands to non-empty
37467 
37468   if test "x$AS" != x; then
37469     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37470 
37471   # First separate the path from the arguments. This will split at the first
37472   # space.
37473   complete="$AS"
37474   path="${complete%% *}"
37475   tmp="$complete EOL"
37476   arguments="${tmp#* }"
37477 
37478   # Input might be given as Windows format, start by converting to
37479   # unix format.
37480   new_path=`$CYGPATH -u "$path"`
37481 
37482   # Now try to locate executable using which
37483   new_path=`$WHICH "$new_path" 2> /dev/null`
37484   # bat and cmd files are not always considered executable in cygwin causing which
37485   # to not find them
37486   if test "x$new_path" = x \
37487       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37488       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37489     new_path=`$CYGPATH -u "$path"`
37490   fi
37491   if test "x$new_path" = x; then
37492     # Oops. Which didn't find the executable.
37493     # The splitting of arguments from the executable at a space might have been incorrect,
37494     # since paths with space are more likely in Windows. Give it another try with the whole
37495     # argument.
37496     path="$complete"
37497     arguments="EOL"
37498     new_path=`$CYGPATH -u "$path"`
37499     new_path=`$WHICH "$new_path" 2> /dev/null`
37500     # bat and cmd files are not always considered executable in cygwin causing which
37501     # to not find them
37502     if test "x$new_path" = x \
37503         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37504         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37505       new_path=`$CYGPATH -u "$path"`
37506     fi
37507     if test "x$new_path" = x; then
37508       # It's still not found. Now this is an unrecoverable error.
37509       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37510 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37511       has_space=`$ECHO "$complete" | $GREP " "`
37512       if test "x$has_space" != x; then
37513         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37514 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37515       fi
37516       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37517     fi
37518   fi
37519 
37520   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37521   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37522   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37523   # "foo.exe" is OK but "foo" is an error.
37524   #
37525   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37526   # It is also a way to make sure we got the proper file name for the real test later on.
37527   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37528   if test "x$test_shortpath" = x; then
37529     # Short path failed, file does not exist as specified.
37530     # Try adding .exe or .cmd
37531     if test -f "${new_path}.exe"; then
37532       input_to_shortpath="${new_path}.exe"
37533     elif test -f "${new_path}.cmd"; then
37534       input_to_shortpath="${new_path}.cmd"
37535     else
37536       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
37537 $as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
37538       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37539 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37540       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37541     fi
37542   else
37543     input_to_shortpath="$new_path"
37544   fi
37545 
37546   # Call helper function which possibly converts this using DOS-style short mode.
37547   # If so, the updated path is stored in $new_path.
37548   new_path="$input_to_shortpath"
37549 
37550   input_path="$input_to_shortpath"
37551   # Check if we need to convert this using DOS-style short mode. If the path
37552   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37553   # take no chances and rewrite it.
37554   # Note: m4 eats our [], so we need to use [ and ] instead.
37555   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37556   if test "x$has_forbidden_chars" != x; then
37557     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37558     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37559     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37560     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37561       # Going to short mode and back again did indeed matter. Since short mode is
37562       # case insensitive, let's make it lowercase to improve readability.
37563       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37564       # Now convert it back to Unix-style (cygpath)
37565       input_path=`$CYGPATH -u "$shortmode_path"`
37566       new_path="$input_path"
37567     fi
37568   fi
37569 
37570   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37571   if test "x$test_cygdrive_prefix" = x; then
37572     # As a simple fix, exclude /usr/bin since it's not a real path.
37573     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37574       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37575       # a path prefixed by /cygdrive for fixpath to work.
37576       new_path="$CYGWIN_ROOT_PATH$input_path"
37577     fi
37578   fi
37579 
37580   # remove trailing .exe if any
37581   new_path="${new_path/%.exe/}"
37582 
37583     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37584 
37585   # First separate the path from the arguments. This will split at the first
37586   # space.
37587   complete="$AS"
37588   path="${complete%% *}"
37589   tmp="$complete EOL"
37590   arguments="${tmp#* }"
37591 
37592   # Input might be given as Windows format, start by converting to
37593   # unix format.
37594   new_path="$path"
37595 
37596   windows_path="$new_path"
37597   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37598     unix_path=`$CYGPATH -u "$windows_path"`
37599     new_path="$unix_path"
37600   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37601     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37602     new_path="$unix_path"
37603   fi
37604 
37605 
37606   # Now try to locate executable using which
37607   new_path=`$WHICH "$new_path" 2> /dev/null`
37608 
37609   if test "x$new_path" = x; then
37610     # Oops. Which didn't find the executable.
37611     # The splitting of arguments from the executable at a space might have been incorrect,
37612     # since paths with space are more likely in Windows. Give it another try with the whole
37613     # argument.
37614     path="$complete"
37615     arguments="EOL"
37616     new_path="$path"
37617 
37618   windows_path="$new_path"
37619   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37620     unix_path=`$CYGPATH -u "$windows_path"`
37621     new_path="$unix_path"
37622   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37623     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37624     new_path="$unix_path"
37625   fi
37626 
37627 
37628     new_path=`$WHICH "$new_path" 2> /dev/null`
37629     # bat and cmd files are not always considered executable in MSYS causing which
37630     # to not find them
37631     if test "x$new_path" = x \
37632         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37633         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37634       new_path="$path"
37635 
37636   windows_path="$new_path"
37637   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37638     unix_path=`$CYGPATH -u "$windows_path"`
37639     new_path="$unix_path"
37640   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37641     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37642     new_path="$unix_path"
37643   fi
37644 
37645     fi
37646 
37647     if test "x$new_path" = x; then
37648       # It's still not found. Now this is an unrecoverable error.
37649       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37650 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37651       has_space=`$ECHO "$complete" | $GREP " "`
37652       if test "x$has_space" != x; then
37653         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37654 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37655       fi
37656       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37657     fi
37658   fi
37659 
37660   # Now new_path has a complete unix path to the binary
37661   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37662     # Keep paths in /bin as-is, but remove trailing .exe if any
37663     new_path="${new_path/%.exe/}"
37664     # Do not save /bin paths to all_fixpath_prefixes!
37665   else
37666     # Not in mixed or Windows style, start by that.
37667     new_path=`cmd //c echo $new_path`
37668 
37669   input_path="$new_path"
37670   # Check if we need to convert this using DOS-style short mode. If the path
37671   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37672   # take no chances and rewrite it.
37673   # Note: m4 eats our [], so we need to use [ and ] instead.
37674   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37675   if test "x$has_forbidden_chars" != x; then
37676     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37677     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37678   fi
37679 
37680     # Output is in $new_path
37681 
37682   windows_path="$new_path"
37683   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37684     unix_path=`$CYGPATH -u "$windows_path"`
37685     new_path="$unix_path"
37686   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37687     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37688     new_path="$unix_path"
37689   fi
37690 
37691     # remove trailing .exe if any
37692     new_path="${new_path/%.exe/}"
37693 
37694     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37695     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37696   fi
37697 
37698     else
37699       # We're on a unix platform. Hooray! :)
37700       # First separate the path from the arguments. This will split at the first
37701       # space.
37702       complete="$AS"
37703       path="${complete%% *}"
37704       tmp="$complete EOL"
37705       arguments="${tmp#* }"
37706 
37707       # Cannot rely on the command "which" here since it doesn't always work.
37708       is_absolute_path=`$ECHO "$path" | $GREP ^/`
37709       if test -z "$is_absolute_path"; then
37710         # Path to executable is not absolute. Find it.
37711         IFS_save="$IFS"
37712         IFS=:
37713         for p in $PATH; do
37714           if test -f "$p/$path" && test -x "$p/$path"; then
37715             new_path="$p/$path"
37716             break
37717           fi
37718         done
37719         IFS="$IFS_save"
37720       else
37721         # This is an absolute path, we can use it without further modifications.
37722         new_path="$path"
37723       fi
37724 
37725       if test "x$new_path" = x; then
37726         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37727 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37728         has_space=`$ECHO "$complete" | $GREP " "`
37729         if test "x$has_space" != x; then
37730           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37731 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37732         fi
37733         as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37734       fi
37735     fi
37736 
37737     # Now join together the path and the arguments once again
37738     if test "x$arguments" != xEOL; then
37739       new_complete="$new_path ${arguments% *}"
37740     else
37741       new_complete="$new_path"
37742     fi
37743 
37744     if test "x$complete" != "x$new_complete"; then
37745       AS="$new_complete"
37746       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
37747 $as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
37748     fi
37749   fi
37750 
37751     if test "x$AS" = x; then
37752       as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
37753     fi
37754   else
37755     # FIXME: is this correct for microsoft?
37756     AS="$CC -c"
37757   fi
37758 
37759 
37760   #
37761   # Setup the archiver (AR)
37762   #
37763   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37764     # The corresponding ar tool is lib.exe (used to create static libraries)
37765     # Extract the first word of "lib", so it can be a program name with args.
37766 set dummy lib; ac_word=$2
37767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37768 $as_echo_n "checking for $ac_word... " >&6; }
37769 if ${ac_cv_prog_AR+:} false; then :
37770   $as_echo_n "(cached) " >&6
37771 else
37772   if test -n "$AR"; then
37773   ac_cv_prog_AR="$AR" # Let the user override the test.
37774 else
37775 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37776 for as_dir in $PATH
37777 do
37778   IFS=$as_save_IFS
37779   test -z "$as_dir" && as_dir=.
37780     for ac_exec_ext in '' $ac_executable_extensions; do
37781   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37782     ac_cv_prog_AR="lib"
37783     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37784     break 2
37785   fi
37786 done
37787   done
37788 IFS=$as_save_IFS
37789 
37790 fi
37791 fi
37792 AR=$ac_cv_prog_AR
37793 if test -n "$AR"; then
37794   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37795 $as_echo "$AR" >&6; }
37796 else
37797   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37798 $as_echo "no" >&6; }
37799 fi
37800 
37801 
37802   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
37803 
37804 
37805   # Publish this variable in the help.
37806 
37807 
37808   if [ -z "${AR+x}" ]; then
37809     # The variable is not set by user, try to locate tool using the code snippet
37810     if test -n "$ac_tool_prefix"; then
37811   for ac_prog in ar gcc-ar
37812   do
37813     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37814 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37816 $as_echo_n "checking for $ac_word... " >&6; }
37817 if ${ac_cv_prog_AR+:} false; then :
37818   $as_echo_n "(cached) " >&6
37819 else
37820   if test -n "$AR"; then
37821   ac_cv_prog_AR="$AR" # Let the user override the test.
37822 else
37823 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37824 for as_dir in $PATH
37825 do
37826   IFS=$as_save_IFS
37827   test -z "$as_dir" && as_dir=.
37828     for ac_exec_ext in '' $ac_executable_extensions; do
37829   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37830     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37831     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37832     break 2
37833   fi
37834 done
37835   done
37836 IFS=$as_save_IFS
37837 
37838 fi
37839 fi
37840 AR=$ac_cv_prog_AR
37841 if test -n "$AR"; then
37842   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37843 $as_echo "$AR" >&6; }
37844 else
37845   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37846 $as_echo "no" >&6; }
37847 fi
37848 
37849 
37850     test -n "$AR" && break
37851   done
37852 fi
37853 if test -z "$AR"; then
37854   ac_ct_AR=$AR
37855   for ac_prog in ar gcc-ar
37856 do
37857   # Extract the first word of "$ac_prog", so it can be a program name with args.
37858 set dummy $ac_prog; ac_word=$2
37859 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37860 $as_echo_n "checking for $ac_word... " >&6; }
37861 if ${ac_cv_prog_ac_ct_AR+:} false; then :
37862   $as_echo_n "(cached) " >&6
37863 else
37864   if test -n "$ac_ct_AR"; then
37865   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37866 else
37867 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37868 for as_dir in $PATH
37869 do
37870   IFS=$as_save_IFS
37871   test -z "$as_dir" && as_dir=.
37872     for ac_exec_ext in '' $ac_executable_extensions; do
37873   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37874     ac_cv_prog_ac_ct_AR="$ac_prog"
37875     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37876     break 2
37877   fi
37878 done
37879   done
37880 IFS=$as_save_IFS
37881 
37882 fi
37883 fi
37884 ac_ct_AR=$ac_cv_prog_ac_ct_AR
37885 if test -n "$ac_ct_AR"; then
37886   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37887 $as_echo "$ac_ct_AR" >&6; }
37888 else
37889   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37890 $as_echo "no" >&6; }
37891 fi
37892 
37893 
37894   test -n "$ac_ct_AR" && break
37895 done
37896 
37897   if test "x$ac_ct_AR" = x; then
37898     AR=""
37899   else
37900     case $cross_compiling:$ac_tool_warned in
37901 yes:)
37902 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37903 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37904 ac_tool_warned=yes ;;
37905 esac
37906     AR=$ac_ct_AR
37907   fi
37908 fi
37909 
37910   else
37911     # The variable is set, but is it from the command line or the environment?
37912 
37913     # Try to remove the string !AR! from our list.
37914     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37915     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37916       # If it failed, the variable was not from the command line. Ignore it,
37917       # but warn the user (except for BASH, which is always set by the calling BASH).
37918       if test "xAR" != xBASH; then
37919         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37920 $as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37921       fi
37922       # Try to locate tool using the code snippet
37923       if test -n "$ac_tool_prefix"; then
37924   for ac_prog in ar gcc-ar
37925   do
37926     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37927 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37929 $as_echo_n "checking for $ac_word... " >&6; }
37930 if ${ac_cv_prog_AR+:} false; then :
37931   $as_echo_n "(cached) " >&6
37932 else
37933   if test -n "$AR"; then
37934   ac_cv_prog_AR="$AR" # Let the user override the test.
37935 else
37936 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37937 for as_dir in $PATH
37938 do
37939   IFS=$as_save_IFS
37940   test -z "$as_dir" && as_dir=.
37941     for ac_exec_ext in '' $ac_executable_extensions; do
37942   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37943     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37944     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37945     break 2
37946   fi
37947 done
37948   done
37949 IFS=$as_save_IFS
37950 
37951 fi
37952 fi
37953 AR=$ac_cv_prog_AR
37954 if test -n "$AR"; then
37955   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37956 $as_echo "$AR" >&6; }
37957 else
37958   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37959 $as_echo "no" >&6; }
37960 fi
37961 
37962 
37963     test -n "$AR" && break
37964   done
37965 fi
37966 if test -z "$AR"; then
37967   ac_ct_AR=$AR
37968   for ac_prog in ar gcc-ar
37969 do
37970   # Extract the first word of "$ac_prog", so it can be a program name with args.
37971 set dummy $ac_prog; ac_word=$2
37972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37973 $as_echo_n "checking for $ac_word... " >&6; }
37974 if ${ac_cv_prog_ac_ct_AR+:} false; then :
37975   $as_echo_n "(cached) " >&6
37976 else
37977   if test -n "$ac_ct_AR"; then
37978   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37979 else
37980 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37981 for as_dir in $PATH
37982 do
37983   IFS=$as_save_IFS
37984   test -z "$as_dir" && as_dir=.
37985     for ac_exec_ext in '' $ac_executable_extensions; do
37986   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37987     ac_cv_prog_ac_ct_AR="$ac_prog"
37988     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37989     break 2
37990   fi
37991 done
37992   done
37993 IFS=$as_save_IFS
37994 
37995 fi
37996 fi
37997 ac_ct_AR=$ac_cv_prog_ac_ct_AR
37998 if test -n "$ac_ct_AR"; then
37999   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38000 $as_echo "$ac_ct_AR" >&6; }
38001 else
38002   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38003 $as_echo "no" >&6; }
38004 fi
38005 
38006 
38007   test -n "$ac_ct_AR" && break
38008 done
38009 
38010   if test "x$ac_ct_AR" = x; then
38011     AR=""
38012   else
38013     case $cross_compiling:$ac_tool_warned in
38014 yes:)
38015 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38016 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38017 ac_tool_warned=yes ;;
38018 esac
38019     AR=$ac_ct_AR
38020   fi
38021 fi
38022 
38023     else
38024       # If it succeeded, then it was overridden by the user. We will use it
38025       # for the tool.
38026 
38027       # First remove it from the list of overridden variables, so we can test
38028       # for unknown variables in the end.
38029       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38030 
38031       # Check if we try to supply an empty value
38032       if test "x$AR" = x; then
38033         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
38034 $as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
38035         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38036 $as_echo_n "checking for AR... " >&6; }
38037         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38038 $as_echo "disabled" >&6; }
38039       else
38040         # Check if the provided tool contains a complete path.
38041         tool_specified="$AR"
38042         tool_basename="${tool_specified##*/}"
38043         if test "x$tool_basename" = "x$tool_specified"; then
38044           # A command without a complete path is provided, search $PATH.
38045           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
38046 $as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
38047           # Extract the first word of "$tool_basename", so it can be a program name with args.
38048 set dummy $tool_basename; ac_word=$2
38049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38050 $as_echo_n "checking for $ac_word... " >&6; }
38051 if ${ac_cv_path_AR+:} false; then :
38052   $as_echo_n "(cached) " >&6
38053 else
38054   case $AR in
38055   [\\/]* | ?:[\\/]*)
38056   ac_cv_path_AR="$AR" # Let the user override the test with a path.
38057   ;;
38058   *)
38059   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38060 for as_dir in $PATH
38061 do
38062   IFS=$as_save_IFS
38063   test -z "$as_dir" && as_dir=.
38064     for ac_exec_ext in '' $ac_executable_extensions; do
38065   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38066     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
38067     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38068     break 2
38069   fi
38070 done
38071   done
38072 IFS=$as_save_IFS
38073 
38074   ;;
38075 esac
38076 fi
38077 AR=$ac_cv_path_AR
38078 if test -n "$AR"; then
38079   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38080 $as_echo "$AR" >&6; }
38081 else
38082   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38083 $as_echo "no" >&6; }
38084 fi
38085 
38086 
38087           if test "x$AR" = x; then
38088             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38089           fi
38090         else
38091           # Otherwise we believe it is a complete path. Use it as it is.
38092           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
38093 $as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
38094           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38095 $as_echo_n "checking for AR... " >&6; }
38096           if test ! -x "$tool_specified"; then
38097             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38098 $as_echo "not found" >&6; }
38099             as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
38100           fi
38101           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38102 $as_echo "$tool_specified" >&6; }
38103         fi
38104       fi
38105     fi
38106 
38107   fi
38108 
38109 
38110   else
38111 
38112 
38113   # Publish this variable in the help.
38114 
38115 
38116   if [ -z "${AR+x}" ]; then
38117     # The variable is not set by user, try to locate tool using the code snippet
38118     if test -n "$ac_tool_prefix"; then
38119   for ac_prog in ar
38120   do
38121     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38122 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38124 $as_echo_n "checking for $ac_word... " >&6; }
38125 if ${ac_cv_prog_AR+:} false; then :
38126   $as_echo_n "(cached) " >&6
38127 else
38128   if test -n "$AR"; then
38129   ac_cv_prog_AR="$AR" # Let the user override the test.
38130 else
38131 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38132 for as_dir in $PATH
38133 do
38134   IFS=$as_save_IFS
38135   test -z "$as_dir" && as_dir=.
38136     for ac_exec_ext in '' $ac_executable_extensions; do
38137   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38138     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38139     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38140     break 2
38141   fi
38142 done
38143   done
38144 IFS=$as_save_IFS
38145 
38146 fi
38147 fi
38148 AR=$ac_cv_prog_AR
38149 if test -n "$AR"; then
38150   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38151 $as_echo "$AR" >&6; }
38152 else
38153   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38154 $as_echo "no" >&6; }
38155 fi
38156 
38157 
38158     test -n "$AR" && break
38159   done
38160 fi
38161 if test -z "$AR"; then
38162   ac_ct_AR=$AR
38163   for ac_prog in ar
38164 do
38165   # Extract the first word of "$ac_prog", so it can be a program name with args.
38166 set dummy $ac_prog; ac_word=$2
38167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38168 $as_echo_n "checking for $ac_word... " >&6; }
38169 if ${ac_cv_prog_ac_ct_AR+:} false; then :
38170   $as_echo_n "(cached) " >&6
38171 else
38172   if test -n "$ac_ct_AR"; then
38173   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38174 else
38175 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38176 for as_dir in $PATH
38177 do
38178   IFS=$as_save_IFS
38179   test -z "$as_dir" && as_dir=.
38180     for ac_exec_ext in '' $ac_executable_extensions; do
38181   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38182     ac_cv_prog_ac_ct_AR="$ac_prog"
38183     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38184     break 2
38185   fi
38186 done
38187   done
38188 IFS=$as_save_IFS
38189 
38190 fi
38191 fi
38192 ac_ct_AR=$ac_cv_prog_ac_ct_AR
38193 if test -n "$ac_ct_AR"; then
38194   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38195 $as_echo "$ac_ct_AR" >&6; }
38196 else
38197   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38198 $as_echo "no" >&6; }
38199 fi
38200 
38201 
38202   test -n "$ac_ct_AR" && break
38203 done
38204 
38205   if test "x$ac_ct_AR" = x; then
38206     AR=""
38207   else
38208     case $cross_compiling:$ac_tool_warned in
38209 yes:)
38210 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38211 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38212 ac_tool_warned=yes ;;
38213 esac
38214     AR=$ac_ct_AR
38215   fi
38216 fi
38217 
38218   else
38219     # The variable is set, but is it from the command line or the environment?
38220 
38221     # Try to remove the string !AR! from our list.
38222     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
38223     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38224       # If it failed, the variable was not from the command line. Ignore it,
38225       # but warn the user (except for BASH, which is always set by the calling BASH).
38226       if test "xAR" != xBASH; then
38227         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
38228 $as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
38229       fi
38230       # Try to locate tool using the code snippet
38231       if test -n "$ac_tool_prefix"; then
38232   for ac_prog in ar
38233   do
38234     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38235 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38237 $as_echo_n "checking for $ac_word... " >&6; }
38238 if ${ac_cv_prog_AR+:} false; then :
38239   $as_echo_n "(cached) " >&6
38240 else
38241   if test -n "$AR"; then
38242   ac_cv_prog_AR="$AR" # Let the user override the test.
38243 else
38244 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38245 for as_dir in $PATH
38246 do
38247   IFS=$as_save_IFS
38248   test -z "$as_dir" && as_dir=.
38249     for ac_exec_ext in '' $ac_executable_extensions; do
38250   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38251     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38252     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38253     break 2
38254   fi
38255 done
38256   done
38257 IFS=$as_save_IFS
38258 
38259 fi
38260 fi
38261 AR=$ac_cv_prog_AR
38262 if test -n "$AR"; then
38263   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38264 $as_echo "$AR" >&6; }
38265 else
38266   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38267 $as_echo "no" >&6; }
38268 fi
38269 
38270 
38271     test -n "$AR" && break
38272   done
38273 fi
38274 if test -z "$AR"; then
38275   ac_ct_AR=$AR
38276   for ac_prog in ar
38277 do
38278   # Extract the first word of "$ac_prog", so it can be a program name with args.
38279 set dummy $ac_prog; ac_word=$2
38280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38281 $as_echo_n "checking for $ac_word... " >&6; }
38282 if ${ac_cv_prog_ac_ct_AR+:} false; then :
38283   $as_echo_n "(cached) " >&6
38284 else
38285   if test -n "$ac_ct_AR"; then
38286   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38287 else
38288 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38289 for as_dir in $PATH
38290 do
38291   IFS=$as_save_IFS
38292   test -z "$as_dir" && as_dir=.
38293     for ac_exec_ext in '' $ac_executable_extensions; do
38294   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38295     ac_cv_prog_ac_ct_AR="$ac_prog"
38296     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38297     break 2
38298   fi
38299 done
38300   done
38301 IFS=$as_save_IFS
38302 
38303 fi
38304 fi
38305 ac_ct_AR=$ac_cv_prog_ac_ct_AR
38306 if test -n "$ac_ct_AR"; then
38307   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38308 $as_echo "$ac_ct_AR" >&6; }
38309 else
38310   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38311 $as_echo "no" >&6; }
38312 fi
38313 
38314 
38315   test -n "$ac_ct_AR" && break
38316 done
38317 
38318   if test "x$ac_ct_AR" = x; then
38319     AR=""
38320   else
38321     case $cross_compiling:$ac_tool_warned in
38322 yes:)
38323 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38324 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38325 ac_tool_warned=yes ;;
38326 esac
38327     AR=$ac_ct_AR
38328   fi
38329 fi
38330 
38331     else
38332       # If it succeeded, then it was overridden by the user. We will use it
38333       # for the tool.
38334 
38335       # First remove it from the list of overridden variables, so we can test
38336       # for unknown variables in the end.
38337       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38338 
38339       # Check if we try to supply an empty value
38340       if test "x$AR" = x; then
38341         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
38342 $as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
38343         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38344 $as_echo_n "checking for AR... " >&6; }
38345         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38346 $as_echo "disabled" >&6; }
38347       else
38348         # Check if the provided tool contains a complete path.
38349         tool_specified="$AR"
38350         tool_basename="${tool_specified##*/}"
38351         if test "x$tool_basename" = "x$tool_specified"; then
38352           # A command without a complete path is provided, search $PATH.
38353           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
38354 $as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
38355           # Extract the first word of "$tool_basename", so it can be a program name with args.
38356 set dummy $tool_basename; ac_word=$2
38357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38358 $as_echo_n "checking for $ac_word... " >&6; }
38359 if ${ac_cv_path_AR+:} false; then :
38360   $as_echo_n "(cached) " >&6
38361 else
38362   case $AR in
38363   [\\/]* | ?:[\\/]*)
38364   ac_cv_path_AR="$AR" # Let the user override the test with a path.
38365   ;;
38366   *)
38367   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38368 for as_dir in $PATH
38369 do
38370   IFS=$as_save_IFS
38371   test -z "$as_dir" && as_dir=.
38372     for ac_exec_ext in '' $ac_executable_extensions; do
38373   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38374     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
38375     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38376     break 2
38377   fi
38378 done
38379   done
38380 IFS=$as_save_IFS
38381 
38382   ;;
38383 esac
38384 fi
38385 AR=$ac_cv_path_AR
38386 if test -n "$AR"; then
38387   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38388 $as_echo "$AR" >&6; }
38389 else
38390   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38391 $as_echo "no" >&6; }
38392 fi
38393 
38394 
38395           if test "x$AR" = x; then
38396             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38397           fi
38398         else
38399           # Otherwise we believe it is a complete path. Use it as it is.
38400           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
38401 $as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
38402           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38403 $as_echo_n "checking for AR... " >&6; }
38404           if test ! -x "$tool_specified"; then
38405             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38406 $as_echo "not found" >&6; }
38407             as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
38408           fi
38409           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38410 $as_echo "$tool_specified" >&6; }
38411         fi
38412       fi
38413     fi
38414 
38415   fi
38416 
38417 
38418   fi
38419 
38420   # Only process if variable expands to non-empty
38421 
38422   if test "x$AR" != x; then
38423     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38424 
38425   # First separate the path from the arguments. This will split at the first
38426   # space.
38427   complete="$AR"
38428   path="${complete%% *}"
38429   tmp="$complete EOL"
38430   arguments="${tmp#* }"
38431 
38432   # Input might be given as Windows format, start by converting to
38433   # unix format.
38434   new_path=`$CYGPATH -u "$path"`
38435 
38436   # Now try to locate executable using which
38437   new_path=`$WHICH "$new_path" 2> /dev/null`
38438   # bat and cmd files are not always considered executable in cygwin causing which
38439   # to not find them
38440   if test "x$new_path" = x \
38441       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38442       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38443     new_path=`$CYGPATH -u "$path"`
38444   fi
38445   if test "x$new_path" = x; then
38446     # Oops. Which didn't find the executable.
38447     # The splitting of arguments from the executable at a space might have been incorrect,
38448     # since paths with space are more likely in Windows. Give it another try with the whole
38449     # argument.
38450     path="$complete"
38451     arguments="EOL"
38452     new_path=`$CYGPATH -u "$path"`
38453     new_path=`$WHICH "$new_path" 2> /dev/null`
38454     # bat and cmd files are not always considered executable in cygwin causing which
38455     # to not find them
38456     if test "x$new_path" = x \
38457         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38458         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38459       new_path=`$CYGPATH -u "$path"`
38460     fi
38461     if test "x$new_path" = x; then
38462       # It's still not found. Now this is an unrecoverable error.
38463       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38464 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38465       has_space=`$ECHO "$complete" | $GREP " "`
38466       if test "x$has_space" != x; then
38467         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38468 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38469       fi
38470       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38471     fi
38472   fi
38473 
38474   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38475   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38476   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38477   # "foo.exe" is OK but "foo" is an error.
38478   #
38479   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38480   # It is also a way to make sure we got the proper file name for the real test later on.
38481   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38482   if test "x$test_shortpath" = x; then
38483     # Short path failed, file does not exist as specified.
38484     # Try adding .exe or .cmd
38485     if test -f "${new_path}.exe"; then
38486       input_to_shortpath="${new_path}.exe"
38487     elif test -f "${new_path}.cmd"; then
38488       input_to_shortpath="${new_path}.cmd"
38489     else
38490       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
38491 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
38492       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38493 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38494       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38495     fi
38496   else
38497     input_to_shortpath="$new_path"
38498   fi
38499 
38500   # Call helper function which possibly converts this using DOS-style short mode.
38501   # If so, the updated path is stored in $new_path.
38502   new_path="$input_to_shortpath"
38503 
38504   input_path="$input_to_shortpath"
38505   # Check if we need to convert this using DOS-style short mode. If the path
38506   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38507   # take no chances and rewrite it.
38508   # Note: m4 eats our [], so we need to use [ and ] instead.
38509   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38510   if test "x$has_forbidden_chars" != x; then
38511     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38512     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38513     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38514     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38515       # Going to short mode and back again did indeed matter. Since short mode is
38516       # case insensitive, let's make it lowercase to improve readability.
38517       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38518       # Now convert it back to Unix-style (cygpath)
38519       input_path=`$CYGPATH -u "$shortmode_path"`
38520       new_path="$input_path"
38521     fi
38522   fi
38523 
38524   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38525   if test "x$test_cygdrive_prefix" = x; then
38526     # As a simple fix, exclude /usr/bin since it's not a real path.
38527     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38528       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38529       # a path prefixed by /cygdrive for fixpath to work.
38530       new_path="$CYGWIN_ROOT_PATH$input_path"
38531     fi
38532   fi
38533 
38534   # remove trailing .exe if any
38535   new_path="${new_path/%.exe/}"
38536 
38537     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38538 
38539   # First separate the path from the arguments. This will split at the first
38540   # space.
38541   complete="$AR"
38542   path="${complete%% *}"
38543   tmp="$complete EOL"
38544   arguments="${tmp#* }"
38545 
38546   # Input might be given as Windows format, start by converting to
38547   # unix format.
38548   new_path="$path"
38549 
38550   windows_path="$new_path"
38551   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38552     unix_path=`$CYGPATH -u "$windows_path"`
38553     new_path="$unix_path"
38554   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38555     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38556     new_path="$unix_path"
38557   fi
38558 
38559 
38560   # Now try to locate executable using which
38561   new_path=`$WHICH "$new_path" 2> /dev/null`
38562 
38563   if test "x$new_path" = x; then
38564     # Oops. Which didn't find the executable.
38565     # The splitting of arguments from the executable at a space might have been incorrect,
38566     # since paths with space are more likely in Windows. Give it another try with the whole
38567     # argument.
38568     path="$complete"
38569     arguments="EOL"
38570     new_path="$path"
38571 
38572   windows_path="$new_path"
38573   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38574     unix_path=`$CYGPATH -u "$windows_path"`
38575     new_path="$unix_path"
38576   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38577     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38578     new_path="$unix_path"
38579   fi
38580 
38581 
38582     new_path=`$WHICH "$new_path" 2> /dev/null`
38583     # bat and cmd files are not always considered executable in MSYS causing which
38584     # to not find them
38585     if test "x$new_path" = x \
38586         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38587         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38588       new_path="$path"
38589 
38590   windows_path="$new_path"
38591   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38592     unix_path=`$CYGPATH -u "$windows_path"`
38593     new_path="$unix_path"
38594   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38595     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38596     new_path="$unix_path"
38597   fi
38598 
38599     fi
38600 
38601     if test "x$new_path" = x; then
38602       # It's still not found. Now this is an unrecoverable error.
38603       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38604 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38605       has_space=`$ECHO "$complete" | $GREP " "`
38606       if test "x$has_space" != x; then
38607         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38608 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38609       fi
38610       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38611     fi
38612   fi
38613 
38614   # Now new_path has a complete unix path to the binary
38615   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38616     # Keep paths in /bin as-is, but remove trailing .exe if any
38617     new_path="${new_path/%.exe/}"
38618     # Do not save /bin paths to all_fixpath_prefixes!
38619   else
38620     # Not in mixed or Windows style, start by that.
38621     new_path=`cmd //c echo $new_path`
38622 
38623   input_path="$new_path"
38624   # Check if we need to convert this using DOS-style short mode. If the path
38625   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38626   # take no chances and rewrite it.
38627   # Note: m4 eats our [], so we need to use [ and ] instead.
38628   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38629   if test "x$has_forbidden_chars" != x; then
38630     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38631     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38632   fi
38633 
38634     # Output is in $new_path
38635 
38636   windows_path="$new_path"
38637   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38638     unix_path=`$CYGPATH -u "$windows_path"`
38639     new_path="$unix_path"
38640   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38641     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38642     new_path="$unix_path"
38643   fi
38644 
38645     # remove trailing .exe if any
38646     new_path="${new_path/%.exe/}"
38647 
38648     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38649     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38650   fi
38651 
38652     else
38653       # We're on a unix platform. Hooray! :)
38654       # First separate the path from the arguments. This will split at the first
38655       # space.
38656       complete="$AR"
38657       path="${complete%% *}"
38658       tmp="$complete EOL"
38659       arguments="${tmp#* }"
38660 
38661       # Cannot rely on the command "which" here since it doesn't always work.
38662       is_absolute_path=`$ECHO "$path" | $GREP ^/`
38663       if test -z "$is_absolute_path"; then
38664         # Path to executable is not absolute. Find it.
38665         IFS_save="$IFS"
38666         IFS=:
38667         for p in $PATH; do
38668           if test -f "$p/$path" && test -x "$p/$path"; then
38669             new_path="$p/$path"
38670             break
38671           fi
38672         done
38673         IFS="$IFS_save"
38674       else
38675         # This is an absolute path, we can use it without further modifications.
38676         new_path="$path"
38677       fi
38678 
38679       if test "x$new_path" = x; then
38680         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38681 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38682         has_space=`$ECHO "$complete" | $GREP " "`
38683         if test "x$has_space" != x; then
38684           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38685 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38686         fi
38687         as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38688       fi
38689     fi
38690 
38691     # Now join together the path and the arguments once again
38692     if test "x$arguments" != xEOL; then
38693       new_complete="$new_path ${arguments% *}"
38694     else
38695       new_complete="$new_path"
38696     fi
38697 
38698     if test "x$complete" != "x$new_complete"; then
38699       AR="$new_complete"
38700       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
38701 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
38702     fi
38703   fi
38704 
38705 
38706 
38707   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
38708 
38709 
38710   # Publish this variable in the help.
38711 
38712 
38713   if [ -z "${LIPO+x}" ]; then
38714     # The variable is not set by user, try to locate tool using the code snippet
38715     for ac_prog in lipo
38716 do
38717   # Extract the first word of "$ac_prog", so it can be a program name with args.
38718 set dummy $ac_prog; ac_word=$2
38719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38720 $as_echo_n "checking for $ac_word... " >&6; }
38721 if ${ac_cv_path_LIPO+:} false; then :
38722   $as_echo_n "(cached) " >&6
38723 else
38724   case $LIPO in
38725   [\\/]* | ?:[\\/]*)
38726   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38727   ;;
38728   *)
38729   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38730 for as_dir in $PATH
38731 do
38732   IFS=$as_save_IFS
38733   test -z "$as_dir" && as_dir=.
38734     for ac_exec_ext in '' $ac_executable_extensions; do
38735   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38736     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38737     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38738     break 2
38739   fi
38740 done
38741   done
38742 IFS=$as_save_IFS
38743 
38744   ;;
38745 esac
38746 fi
38747 LIPO=$ac_cv_path_LIPO
38748 if test -n "$LIPO"; then
38749   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38750 $as_echo "$LIPO" >&6; }
38751 else
38752   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38753 $as_echo "no" >&6; }
38754 fi
38755 
38756 
38757   test -n "$LIPO" && break
38758 done
38759 
38760   else
38761     # The variable is set, but is it from the command line or the environment?
38762 
38763     # Try to remove the string !LIPO! from our list.
38764     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
38765     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38766       # If it failed, the variable was not from the command line. Ignore it,
38767       # but warn the user (except for BASH, which is always set by the calling BASH).
38768       if test "xLIPO" != xBASH; then
38769         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
38770 $as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
38771       fi
38772       # Try to locate tool using the code snippet
38773       for ac_prog in lipo
38774 do
38775   # Extract the first word of "$ac_prog", so it can be a program name with args.
38776 set dummy $ac_prog; ac_word=$2
38777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38778 $as_echo_n "checking for $ac_word... " >&6; }
38779 if ${ac_cv_path_LIPO+:} false; then :
38780   $as_echo_n "(cached) " >&6
38781 else
38782   case $LIPO in
38783   [\\/]* | ?:[\\/]*)
38784   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38785   ;;
38786   *)
38787   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38788 for as_dir in $PATH
38789 do
38790   IFS=$as_save_IFS
38791   test -z "$as_dir" && as_dir=.
38792     for ac_exec_ext in '' $ac_executable_extensions; do
38793   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38794     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38795     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38796     break 2
38797   fi
38798 done
38799   done
38800 IFS=$as_save_IFS
38801 
38802   ;;
38803 esac
38804 fi
38805 LIPO=$ac_cv_path_LIPO
38806 if test -n "$LIPO"; then
38807   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38808 $as_echo "$LIPO" >&6; }
38809 else
38810   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38811 $as_echo "no" >&6; }
38812 fi
38813 
38814 
38815   test -n "$LIPO" && break
38816 done
38817 
38818     else
38819       # If it succeeded, then it was overridden by the user. We will use it
38820       # for the tool.
38821 
38822       # First remove it from the list of overridden variables, so we can test
38823       # for unknown variables in the end.
38824       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38825 
38826       # Check if we try to supply an empty value
38827       if test "x$LIPO" = x; then
38828         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
38829 $as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
38830         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38831 $as_echo_n "checking for LIPO... " >&6; }
38832         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38833 $as_echo "disabled" >&6; }
38834       else
38835         # Check if the provided tool contains a complete path.
38836         tool_specified="$LIPO"
38837         tool_basename="${tool_specified##*/}"
38838         if test "x$tool_basename" = "x$tool_specified"; then
38839           # A command without a complete path is provided, search $PATH.
38840           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
38841 $as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
38842           # Extract the first word of "$tool_basename", so it can be a program name with args.
38843 set dummy $tool_basename; ac_word=$2
38844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38845 $as_echo_n "checking for $ac_word... " >&6; }
38846 if ${ac_cv_path_LIPO+:} false; then :
38847   $as_echo_n "(cached) " >&6
38848 else
38849   case $LIPO in
38850   [\\/]* | ?:[\\/]*)
38851   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38852   ;;
38853   *)
38854   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38855 for as_dir in $PATH
38856 do
38857   IFS=$as_save_IFS
38858   test -z "$as_dir" && as_dir=.
38859     for ac_exec_ext in '' $ac_executable_extensions; do
38860   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38861     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38862     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38863     break 2
38864   fi
38865 done
38866   done
38867 IFS=$as_save_IFS
38868 
38869   ;;
38870 esac
38871 fi
38872 LIPO=$ac_cv_path_LIPO
38873 if test -n "$LIPO"; then
38874   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38875 $as_echo "$LIPO" >&6; }
38876 else
38877   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38878 $as_echo "no" >&6; }
38879 fi
38880 
38881 
38882           if test "x$LIPO" = x; then
38883             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38884           fi
38885         else
38886           # Otherwise we believe it is a complete path. Use it as it is.
38887           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
38888 $as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
38889           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38890 $as_echo_n "checking for LIPO... " >&6; }
38891           if test ! -x "$tool_specified"; then
38892             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38893 $as_echo "not found" >&6; }
38894             as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
38895           fi
38896           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38897 $as_echo "$tool_specified" >&6; }
38898         fi
38899       fi
38900     fi
38901 
38902   fi
38903 
38904 
38905 
38906   # Only process if variable expands to non-empty
38907 
38908   if test "x$LIPO" != x; then
38909     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38910 
38911   # First separate the path from the arguments. This will split at the first
38912   # space.
38913   complete="$LIPO"
38914   path="${complete%% *}"
38915   tmp="$complete EOL"
38916   arguments="${tmp#* }"
38917 
38918   # Input might be given as Windows format, start by converting to
38919   # unix format.
38920   new_path=`$CYGPATH -u "$path"`
38921 
38922   # Now try to locate executable using which
38923   new_path=`$WHICH "$new_path" 2> /dev/null`
38924   # bat and cmd files are not always considered executable in cygwin causing which
38925   # to not find them
38926   if test "x$new_path" = x \
38927       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38928       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38929     new_path=`$CYGPATH -u "$path"`
38930   fi
38931   if test "x$new_path" = x; then
38932     # Oops. Which didn't find the executable.
38933     # The splitting of arguments from the executable at a space might have been incorrect,
38934     # since paths with space are more likely in Windows. Give it another try with the whole
38935     # argument.
38936     path="$complete"
38937     arguments="EOL"
38938     new_path=`$CYGPATH -u "$path"`
38939     new_path=`$WHICH "$new_path" 2> /dev/null`
38940     # bat and cmd files are not always considered executable in cygwin causing which
38941     # to not find them
38942     if test "x$new_path" = x \
38943         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38944         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38945       new_path=`$CYGPATH -u "$path"`
38946     fi
38947     if test "x$new_path" = x; then
38948       # It's still not found. Now this is an unrecoverable error.
38949       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38950 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38951       has_space=`$ECHO "$complete" | $GREP " "`
38952       if test "x$has_space" != x; then
38953         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38954 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38955       fi
38956       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38957     fi
38958   fi
38959 
38960   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38961   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38962   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38963   # "foo.exe" is OK but "foo" is an error.
38964   #
38965   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38966   # It is also a way to make sure we got the proper file name for the real test later on.
38967   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38968   if test "x$test_shortpath" = x; then
38969     # Short path failed, file does not exist as specified.
38970     # Try adding .exe or .cmd
38971     if test -f "${new_path}.exe"; then
38972       input_to_shortpath="${new_path}.exe"
38973     elif test -f "${new_path}.cmd"; then
38974       input_to_shortpath="${new_path}.cmd"
38975     else
38976       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
38977 $as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
38978       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38979 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38980       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38981     fi
38982   else
38983     input_to_shortpath="$new_path"
38984   fi
38985 
38986   # Call helper function which possibly converts this using DOS-style short mode.
38987   # If so, the updated path is stored in $new_path.
38988   new_path="$input_to_shortpath"
38989 
38990   input_path="$input_to_shortpath"
38991   # Check if we need to convert this using DOS-style short mode. If the path
38992   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38993   # take no chances and rewrite it.
38994   # Note: m4 eats our [], so we need to use [ and ] instead.
38995   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38996   if test "x$has_forbidden_chars" != x; then
38997     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38998     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38999     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39000     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39001       # Going to short mode and back again did indeed matter. Since short mode is
39002       # case insensitive, let's make it lowercase to improve readability.
39003       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39004       # Now convert it back to Unix-style (cygpath)
39005       input_path=`$CYGPATH -u "$shortmode_path"`
39006       new_path="$input_path"
39007     fi
39008   fi
39009 
39010   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39011   if test "x$test_cygdrive_prefix" = x; then
39012     # As a simple fix, exclude /usr/bin since it's not a real path.
39013     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39014       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39015       # a path prefixed by /cygdrive for fixpath to work.
39016       new_path="$CYGWIN_ROOT_PATH$input_path"
39017     fi
39018   fi
39019 
39020   # remove trailing .exe if any
39021   new_path="${new_path/%.exe/}"
39022 
39023     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39024 
39025   # First separate the path from the arguments. This will split at the first
39026   # space.
39027   complete="$LIPO"
39028   path="${complete%% *}"
39029   tmp="$complete EOL"
39030   arguments="${tmp#* }"
39031 
39032   # Input might be given as Windows format, start by converting to
39033   # unix format.
39034   new_path="$path"
39035 
39036   windows_path="$new_path"
39037   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39038     unix_path=`$CYGPATH -u "$windows_path"`
39039     new_path="$unix_path"
39040   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39041     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39042     new_path="$unix_path"
39043   fi
39044 
39045 
39046   # Now try to locate executable using which
39047   new_path=`$WHICH "$new_path" 2> /dev/null`
39048 
39049   if test "x$new_path" = x; then
39050     # Oops. Which didn't find the executable.
39051     # The splitting of arguments from the executable at a space might have been incorrect,
39052     # since paths with space are more likely in Windows. Give it another try with the whole
39053     # argument.
39054     path="$complete"
39055     arguments="EOL"
39056     new_path="$path"
39057 
39058   windows_path="$new_path"
39059   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39060     unix_path=`$CYGPATH -u "$windows_path"`
39061     new_path="$unix_path"
39062   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39063     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39064     new_path="$unix_path"
39065   fi
39066 
39067 
39068     new_path=`$WHICH "$new_path" 2> /dev/null`
39069     # bat and cmd files are not always considered executable in MSYS causing which
39070     # to not find them
39071     if test "x$new_path" = x \
39072         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39073         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39074       new_path="$path"
39075 
39076   windows_path="$new_path"
39077   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39078     unix_path=`$CYGPATH -u "$windows_path"`
39079     new_path="$unix_path"
39080   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39081     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39082     new_path="$unix_path"
39083   fi
39084 
39085     fi
39086 
39087     if test "x$new_path" = x; then
39088       # It's still not found. Now this is an unrecoverable error.
39089       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39090 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39091       has_space=`$ECHO "$complete" | $GREP " "`
39092       if test "x$has_space" != x; then
39093         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39094 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39095       fi
39096       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39097     fi
39098   fi
39099 
39100   # Now new_path has a complete unix path to the binary
39101   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39102     # Keep paths in /bin as-is, but remove trailing .exe if any
39103     new_path="${new_path/%.exe/}"
39104     # Do not save /bin paths to all_fixpath_prefixes!
39105   else
39106     # Not in mixed or Windows style, start by that.
39107     new_path=`cmd //c echo $new_path`
39108 
39109   input_path="$new_path"
39110   # Check if we need to convert this using DOS-style short mode. If the path
39111   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39112   # take no chances and rewrite it.
39113   # Note: m4 eats our [], so we need to use [ and ] instead.
39114   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39115   if test "x$has_forbidden_chars" != x; then
39116     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39117     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39118   fi
39119 
39120     # Output is in $new_path
39121 
39122   windows_path="$new_path"
39123   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39124     unix_path=`$CYGPATH -u "$windows_path"`
39125     new_path="$unix_path"
39126   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39127     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39128     new_path="$unix_path"
39129   fi
39130 
39131     # remove trailing .exe if any
39132     new_path="${new_path/%.exe/}"
39133 
39134     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39135     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39136   fi
39137 
39138     else
39139       # We're on a unix platform. Hooray! :)
39140       # First separate the path from the arguments. This will split at the first
39141       # space.
39142       complete="$LIPO"
39143       path="${complete%% *}"
39144       tmp="$complete EOL"
39145       arguments="${tmp#* }"
39146 
39147       # Cannot rely on the command "which" here since it doesn't always work.
39148       is_absolute_path=`$ECHO "$path" | $GREP ^/`
39149       if test -z "$is_absolute_path"; then
39150         # Path to executable is not absolute. Find it.
39151         IFS_save="$IFS"
39152         IFS=:
39153         for p in $PATH; do
39154           if test -f "$p/$path" && test -x "$p/$path"; then
39155             new_path="$p/$path"
39156             break
39157           fi
39158         done
39159         IFS="$IFS_save"
39160       else
39161         # This is an absolute path, we can use it without further modifications.
39162         new_path="$path"
39163       fi
39164 
39165       if test "x$new_path" = x; then
39166         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39167 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39168         has_space=`$ECHO "$complete" | $GREP " "`
39169         if test "x$has_space" != x; then
39170           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39171 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39172         fi
39173         as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39174       fi
39175     fi
39176 
39177     # Now join together the path and the arguments once again
39178     if test "x$arguments" != xEOL; then
39179       new_complete="$new_path ${arguments% *}"
39180     else
39181       new_complete="$new_path"
39182     fi
39183 
39184     if test "x$complete" != "x$new_complete"; then
39185       LIPO="$new_complete"
39186       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
39187 $as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
39188     fi
39189   fi
39190 
39191   fi
39192 
39193   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
39194     # Extract the first word of "mt", so it can be a program name with args.
39195 set dummy mt; ac_word=$2
39196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39197 $as_echo_n "checking for $ac_word... " >&6; }
39198 if ${ac_cv_prog_MT+:} false; then :
39199   $as_echo_n "(cached) " >&6
39200 else
39201   if test -n "$MT"; then
39202   ac_cv_prog_MT="$MT" # Let the user override the test.
39203 else
39204   ac_prog_rejected=no
39205 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39206 for as_dir in $PATH
39207 do
39208   IFS=$as_save_IFS
39209   test -z "$as_dir" && as_dir=.
39210     for ac_exec_ext in '' $ac_executable_extensions; do
39211   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39212     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
39213        ac_prog_rejected=yes
39214        continue
39215      fi
39216     ac_cv_prog_MT="mt"
39217     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39218     break 2
39219   fi
39220 done
39221   done
39222 IFS=$as_save_IFS
39223 
39224 if test $ac_prog_rejected = yes; then
39225   # We found a bogon in the path, so make sure we never use it.
39226   set dummy $ac_cv_prog_MT
39227   shift
39228   if test $# != 0; then
39229     # We chose a different compiler from the bogus one.
39230     # However, it has the same basename, so the bogon will be chosen
39231     # first if we set MT to just the basename; use the full file name.
39232     shift
39233     ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
39234   fi
39235 fi
39236 fi
39237 fi
39238 MT=$ac_cv_prog_MT
39239 if test -n "$MT"; then
39240   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
39241 $as_echo "$MT" >&6; }
39242 else
39243   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39244 $as_echo "no" >&6; }
39245 fi
39246 
39247 
39248 
39249   # Only process if variable expands to non-empty
39250 
39251   if test "x$MT" != x; then
39252     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39253 
39254   # First separate the path from the arguments. This will split at the first
39255   # space.
39256   complete="$MT"
39257   path="${complete%% *}"
39258   tmp="$complete EOL"
39259   arguments="${tmp#* }"
39260 
39261   # Input might be given as Windows format, start by converting to
39262   # unix format.
39263   new_path=`$CYGPATH -u "$path"`
39264 
39265   # Now try to locate executable using which
39266   new_path=`$WHICH "$new_path" 2> /dev/null`
39267   # bat and cmd files are not always considered executable in cygwin causing which
39268   # to not find them
39269   if test "x$new_path" = x \
39270       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39271       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39272     new_path=`$CYGPATH -u "$path"`
39273   fi
39274   if test "x$new_path" = x; then
39275     # Oops. Which didn't find the executable.
39276     # The splitting of arguments from the executable at a space might have been incorrect,
39277     # since paths with space are more likely in Windows. Give it another try with the whole
39278     # argument.
39279     path="$complete"
39280     arguments="EOL"
39281     new_path=`$CYGPATH -u "$path"`
39282     new_path=`$WHICH "$new_path" 2> /dev/null`
39283     # bat and cmd files are not always considered executable in cygwin causing which
39284     # to not find them
39285     if test "x$new_path" = x \
39286         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39287         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39288       new_path=`$CYGPATH -u "$path"`
39289     fi
39290     if test "x$new_path" = x; then
39291       # It's still not found. Now this is an unrecoverable error.
39292       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39293 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39294       has_space=`$ECHO "$complete" | $GREP " "`
39295       if test "x$has_space" != x; then
39296         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39297 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39298       fi
39299       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39300     fi
39301   fi
39302 
39303   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39304   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39305   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39306   # "foo.exe" is OK but "foo" is an error.
39307   #
39308   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39309   # It is also a way to make sure we got the proper file name for the real test later on.
39310   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39311   if test "x$test_shortpath" = x; then
39312     # Short path failed, file does not exist as specified.
39313     # Try adding .exe or .cmd
39314     if test -f "${new_path}.exe"; then
39315       input_to_shortpath="${new_path}.exe"
39316     elif test -f "${new_path}.cmd"; then
39317       input_to_shortpath="${new_path}.cmd"
39318     else
39319       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
39320 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
39321       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39322 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39323       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39324     fi
39325   else
39326     input_to_shortpath="$new_path"
39327   fi
39328 
39329   # Call helper function which possibly converts this using DOS-style short mode.
39330   # If so, the updated path is stored in $new_path.
39331   new_path="$input_to_shortpath"
39332 
39333   input_path="$input_to_shortpath"
39334   # Check if we need to convert this using DOS-style short mode. If the path
39335   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39336   # take no chances and rewrite it.
39337   # Note: m4 eats our [], so we need to use [ and ] instead.
39338   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39339   if test "x$has_forbidden_chars" != x; then
39340     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39341     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39342     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39343     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39344       # Going to short mode and back again did indeed matter. Since short mode is
39345       # case insensitive, let's make it lowercase to improve readability.
39346       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39347       # Now convert it back to Unix-style (cygpath)
39348       input_path=`$CYGPATH -u "$shortmode_path"`
39349       new_path="$input_path"
39350     fi
39351   fi
39352 
39353   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39354   if test "x$test_cygdrive_prefix" = x; then
39355     # As a simple fix, exclude /usr/bin since it's not a real path.
39356     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39357       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39358       # a path prefixed by /cygdrive for fixpath to work.
39359       new_path="$CYGWIN_ROOT_PATH$input_path"
39360     fi
39361   fi
39362 
39363   # remove trailing .exe if any
39364   new_path="${new_path/%.exe/}"
39365 
39366     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39367 
39368   # First separate the path from the arguments. This will split at the first
39369   # space.
39370   complete="$MT"
39371   path="${complete%% *}"
39372   tmp="$complete EOL"
39373   arguments="${tmp#* }"
39374 
39375   # Input might be given as Windows format, start by converting to
39376   # unix format.
39377   new_path="$path"
39378 
39379   windows_path="$new_path"
39380   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39381     unix_path=`$CYGPATH -u "$windows_path"`
39382     new_path="$unix_path"
39383   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39384     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39385     new_path="$unix_path"
39386   fi
39387 
39388 
39389   # Now try to locate executable using which
39390   new_path=`$WHICH "$new_path" 2> /dev/null`
39391 
39392   if test "x$new_path" = x; then
39393     # Oops. Which didn't find the executable.
39394     # The splitting of arguments from the executable at a space might have been incorrect,
39395     # since paths with space are more likely in Windows. Give it another try with the whole
39396     # argument.
39397     path="$complete"
39398     arguments="EOL"
39399     new_path="$path"
39400 
39401   windows_path="$new_path"
39402   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39403     unix_path=`$CYGPATH -u "$windows_path"`
39404     new_path="$unix_path"
39405   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39406     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39407     new_path="$unix_path"
39408   fi
39409 
39410 
39411     new_path=`$WHICH "$new_path" 2> /dev/null`
39412     # bat and cmd files are not always considered executable in MSYS causing which
39413     # to not find them
39414     if test "x$new_path" = x \
39415         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39416         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39417       new_path="$path"
39418 
39419   windows_path="$new_path"
39420   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39421     unix_path=`$CYGPATH -u "$windows_path"`
39422     new_path="$unix_path"
39423   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39424     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39425     new_path="$unix_path"
39426   fi
39427 
39428     fi
39429 
39430     if test "x$new_path" = x; then
39431       # It's still not found. Now this is an unrecoverable error.
39432       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39433 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39434       has_space=`$ECHO "$complete" | $GREP " "`
39435       if test "x$has_space" != x; then
39436         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39437 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39438       fi
39439       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39440     fi
39441   fi
39442 
39443   # Now new_path has a complete unix path to the binary
39444   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39445     # Keep paths in /bin as-is, but remove trailing .exe if any
39446     new_path="${new_path/%.exe/}"
39447     # Do not save /bin paths to all_fixpath_prefixes!
39448   else
39449     # Not in mixed or Windows style, start by that.
39450     new_path=`cmd //c echo $new_path`
39451 
39452   input_path="$new_path"
39453   # Check if we need to convert this using DOS-style short mode. If the path
39454   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39455   # take no chances and rewrite it.
39456   # Note: m4 eats our [], so we need to use [ and ] instead.
39457   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39458   if test "x$has_forbidden_chars" != x; then
39459     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39460     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39461   fi
39462 
39463     # Output is in $new_path
39464 
39465   windows_path="$new_path"
39466   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39467     unix_path=`$CYGPATH -u "$windows_path"`
39468     new_path="$unix_path"
39469   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39470     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39471     new_path="$unix_path"
39472   fi
39473 
39474     # remove trailing .exe if any
39475     new_path="${new_path/%.exe/}"
39476 
39477     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39478     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39479   fi
39480 
39481     else
39482       # We're on a unix platform. Hooray! :)
39483       # First separate the path from the arguments. This will split at the first
39484       # space.
39485       complete="$MT"
39486       path="${complete%% *}"
39487       tmp="$complete EOL"
39488       arguments="${tmp#* }"
39489 
39490       # Cannot rely on the command "which" here since it doesn't always work.
39491       is_absolute_path=`$ECHO "$path" | $GREP ^/`
39492       if test -z "$is_absolute_path"; then
39493         # Path to executable is not absolute. Find it.
39494         IFS_save="$IFS"
39495         IFS=:
39496         for p in $PATH; do
39497           if test -f "$p/$path" && test -x "$p/$path"; then
39498             new_path="$p/$path"
39499             break
39500           fi
39501         done
39502         IFS="$IFS_save"
39503       else
39504         # This is an absolute path, we can use it without further modifications.
39505         new_path="$path"
39506       fi
39507 
39508       if test "x$new_path" = x; then
39509         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39510 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39511         has_space=`$ECHO "$complete" | $GREP " "`
39512         if test "x$has_space" != x; then
39513           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39514 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39515         fi
39516         as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39517       fi
39518     fi
39519 
39520     # Now join together the path and the arguments once again
39521     if test "x$arguments" != xEOL; then
39522       new_complete="$new_path ${arguments% *}"
39523     else
39524       new_complete="$new_path"
39525     fi
39526 
39527     if test "x$complete" != "x$new_complete"; then
39528       MT="$new_complete"
39529       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
39530 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
39531     fi
39532   fi
39533 
39534     # Setup the resource compiler (RC)
39535     # Extract the first word of "rc", so it can be a program name with args.
39536 set dummy rc; ac_word=$2
39537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39538 $as_echo_n "checking for $ac_word... " >&6; }
39539 if ${ac_cv_prog_RC+:} false; then :
39540   $as_echo_n "(cached) " >&6
39541 else
39542   if test -n "$RC"; then
39543   ac_cv_prog_RC="$RC" # Let the user override the test.
39544 else
39545   ac_prog_rejected=no
39546 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39547 for as_dir in $PATH
39548 do
39549   IFS=$as_save_IFS
39550   test -z "$as_dir" && as_dir=.
39551     for ac_exec_ext in '' $ac_executable_extensions; do
39552   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39553     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
39554        ac_prog_rejected=yes
39555        continue
39556      fi
39557     ac_cv_prog_RC="rc"
39558     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39559     break 2
39560   fi
39561 done
39562   done
39563 IFS=$as_save_IFS
39564 
39565 if test $ac_prog_rejected = yes; then
39566   # We found a bogon in the path, so make sure we never use it.
39567   set dummy $ac_cv_prog_RC
39568   shift
39569   if test $# != 0; then
39570     # We chose a different compiler from the bogus one.
39571     # However, it has the same basename, so the bogon will be chosen
39572     # first if we set RC to just the basename; use the full file name.
39573     shift
39574     ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
39575   fi
39576 fi
39577 fi
39578 fi
39579 RC=$ac_cv_prog_RC
39580 if test -n "$RC"; then
39581   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
39582 $as_echo "$RC" >&6; }
39583 else
39584   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39585 $as_echo "no" >&6; }
39586 fi
39587 
39588 
39589 
39590   # Only process if variable expands to non-empty
39591 
39592   if test "x$RC" != x; then
39593     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39594 
39595   # First separate the path from the arguments. This will split at the first
39596   # space.
39597   complete="$RC"
39598   path="${complete%% *}"
39599   tmp="$complete EOL"
39600   arguments="${tmp#* }"
39601 
39602   # Input might be given as Windows format, start by converting to
39603   # unix format.
39604   new_path=`$CYGPATH -u "$path"`
39605 
39606   # Now try to locate executable using which
39607   new_path=`$WHICH "$new_path" 2> /dev/null`
39608   # bat and cmd files are not always considered executable in cygwin causing which
39609   # to not find them
39610   if test "x$new_path" = x \
39611       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39612       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39613     new_path=`$CYGPATH -u "$path"`
39614   fi
39615   if test "x$new_path" = x; then
39616     # Oops. Which didn't find the executable.
39617     # The splitting of arguments from the executable at a space might have been incorrect,
39618     # since paths with space are more likely in Windows. Give it another try with the whole
39619     # argument.
39620     path="$complete"
39621     arguments="EOL"
39622     new_path=`$CYGPATH -u "$path"`
39623     new_path=`$WHICH "$new_path" 2> /dev/null`
39624     # bat and cmd files are not always considered executable in cygwin causing which
39625     # to not find them
39626     if test "x$new_path" = x \
39627         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39628         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39629       new_path=`$CYGPATH -u "$path"`
39630     fi
39631     if test "x$new_path" = x; then
39632       # It's still not found. Now this is an unrecoverable error.
39633       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39634 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39635       has_space=`$ECHO "$complete" | $GREP " "`
39636       if test "x$has_space" != x; then
39637         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39638 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39639       fi
39640       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39641     fi
39642   fi
39643 
39644   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39645   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39646   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39647   # "foo.exe" is OK but "foo" is an error.
39648   #
39649   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39650   # It is also a way to make sure we got the proper file name for the real test later on.
39651   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39652   if test "x$test_shortpath" = x; then
39653     # Short path failed, file does not exist as specified.
39654     # Try adding .exe or .cmd
39655     if test -f "${new_path}.exe"; then
39656       input_to_shortpath="${new_path}.exe"
39657     elif test -f "${new_path}.cmd"; then
39658       input_to_shortpath="${new_path}.cmd"
39659     else
39660       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
39661 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
39662       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39663 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39664       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39665     fi
39666   else
39667     input_to_shortpath="$new_path"
39668   fi
39669 
39670   # Call helper function which possibly converts this using DOS-style short mode.
39671   # If so, the updated path is stored in $new_path.
39672   new_path="$input_to_shortpath"
39673 
39674   input_path="$input_to_shortpath"
39675   # Check if we need to convert this using DOS-style short mode. If the path
39676   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39677   # take no chances and rewrite it.
39678   # Note: m4 eats our [], so we need to use [ and ] instead.
39679   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39680   if test "x$has_forbidden_chars" != x; then
39681     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39682     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39683     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39684     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39685       # Going to short mode and back again did indeed matter. Since short mode is
39686       # case insensitive, let's make it lowercase to improve readability.
39687       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39688       # Now convert it back to Unix-style (cygpath)
39689       input_path=`$CYGPATH -u "$shortmode_path"`
39690       new_path="$input_path"
39691     fi
39692   fi
39693 
39694   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39695   if test "x$test_cygdrive_prefix" = x; then
39696     # As a simple fix, exclude /usr/bin since it's not a real path.
39697     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39698       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39699       # a path prefixed by /cygdrive for fixpath to work.
39700       new_path="$CYGWIN_ROOT_PATH$input_path"
39701     fi
39702   fi
39703 
39704   # remove trailing .exe if any
39705   new_path="${new_path/%.exe/}"
39706 
39707     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39708 
39709   # First separate the path from the arguments. This will split at the first
39710   # space.
39711   complete="$RC"
39712   path="${complete%% *}"
39713   tmp="$complete EOL"
39714   arguments="${tmp#* }"
39715 
39716   # Input might be given as Windows format, start by converting to
39717   # unix format.
39718   new_path="$path"
39719 
39720   windows_path="$new_path"
39721   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39722     unix_path=`$CYGPATH -u "$windows_path"`
39723     new_path="$unix_path"
39724   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39725     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39726     new_path="$unix_path"
39727   fi
39728 
39729 
39730   # Now try to locate executable using which
39731   new_path=`$WHICH "$new_path" 2> /dev/null`
39732 
39733   if test "x$new_path" = x; then
39734     # Oops. Which didn't find the executable.
39735     # The splitting of arguments from the executable at a space might have been incorrect,
39736     # since paths with space are more likely in Windows. Give it another try with the whole
39737     # argument.
39738     path="$complete"
39739     arguments="EOL"
39740     new_path="$path"
39741 
39742   windows_path="$new_path"
39743   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39744     unix_path=`$CYGPATH -u "$windows_path"`
39745     new_path="$unix_path"
39746   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39747     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39748     new_path="$unix_path"
39749   fi
39750 
39751 
39752     new_path=`$WHICH "$new_path" 2> /dev/null`
39753     # bat and cmd files are not always considered executable in MSYS causing which
39754     # to not find them
39755     if test "x$new_path" = x \
39756         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39757         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39758       new_path="$path"
39759 
39760   windows_path="$new_path"
39761   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39762     unix_path=`$CYGPATH -u "$windows_path"`
39763     new_path="$unix_path"
39764   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39765     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39766     new_path="$unix_path"
39767   fi
39768 
39769     fi
39770 
39771     if test "x$new_path" = x; then
39772       # It's still not found. Now this is an unrecoverable error.
39773       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39774 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39775       has_space=`$ECHO "$complete" | $GREP " "`
39776       if test "x$has_space" != x; then
39777         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39778 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39779       fi
39780       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39781     fi
39782   fi
39783 
39784   # Now new_path has a complete unix path to the binary
39785   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39786     # Keep paths in /bin as-is, but remove trailing .exe if any
39787     new_path="${new_path/%.exe/}"
39788     # Do not save /bin paths to all_fixpath_prefixes!
39789   else
39790     # Not in mixed or Windows style, start by that.
39791     new_path=`cmd //c echo $new_path`
39792 
39793   input_path="$new_path"
39794   # Check if we need to convert this using DOS-style short mode. If the path
39795   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39796   # take no chances and rewrite it.
39797   # Note: m4 eats our [], so we need to use [ and ] instead.
39798   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39799   if test "x$has_forbidden_chars" != x; then
39800     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39801     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39802   fi
39803 
39804     # Output is in $new_path
39805 
39806   windows_path="$new_path"
39807   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39808     unix_path=`$CYGPATH -u "$windows_path"`
39809     new_path="$unix_path"
39810   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39811     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39812     new_path="$unix_path"
39813   fi
39814 
39815     # remove trailing .exe if any
39816     new_path="${new_path/%.exe/}"
39817 
39818     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39819     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39820   fi
39821 
39822     else
39823       # We're on a unix platform. Hooray! :)
39824       # First separate the path from the arguments. This will split at the first
39825       # space.
39826       complete="$RC"
39827       path="${complete%% *}"
39828       tmp="$complete EOL"
39829       arguments="${tmp#* }"
39830 
39831       # Cannot rely on the command "which" here since it doesn't always work.
39832       is_absolute_path=`$ECHO "$path" | $GREP ^/`
39833       if test -z "$is_absolute_path"; then
39834         # Path to executable is not absolute. Find it.
39835         IFS_save="$IFS"
39836         IFS=:
39837         for p in $PATH; do
39838           if test -f "$p/$path" && test -x "$p/$path"; then
39839             new_path="$p/$path"
39840             break
39841           fi
39842         done
39843         IFS="$IFS_save"
39844       else
39845         # This is an absolute path, we can use it without further modifications.
39846         new_path="$path"
39847       fi
39848 
39849       if test "x$new_path" = x; then
39850         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39851 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39852         has_space=`$ECHO "$complete" | $GREP " "`
39853         if test "x$has_space" != x; then
39854           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39855 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39856         fi
39857         as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39858       fi
39859     fi
39860 
39861     # Now join together the path and the arguments once again
39862     if test "x$arguments" != xEOL; then
39863       new_complete="$new_path ${arguments% *}"
39864     else
39865       new_complete="$new_path"
39866     fi
39867 
39868     if test "x$complete" != "x$new_complete"; then
39869       RC="$new_complete"
39870       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
39871 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
39872     fi
39873   fi
39874 
39875     # Extract the first word of "dumpbin", so it can be a program name with args.
39876 set dummy dumpbin; ac_word=$2
39877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39878 $as_echo_n "checking for $ac_word... " >&6; }
39879 if ${ac_cv_prog_DUMPBIN+:} false; then :
39880   $as_echo_n "(cached) " >&6
39881 else
39882   if test -n "$DUMPBIN"; then
39883   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
39884 else
39885 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39886 for as_dir in $PATH
39887 do
39888   IFS=$as_save_IFS
39889   test -z "$as_dir" && as_dir=.
39890     for ac_exec_ext in '' $ac_executable_extensions; do
39891   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39892     ac_cv_prog_DUMPBIN="dumpbin"
39893     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39894     break 2
39895   fi
39896 done
39897   done
39898 IFS=$as_save_IFS
39899 
39900 fi
39901 fi
39902 DUMPBIN=$ac_cv_prog_DUMPBIN
39903 if test -n "$DUMPBIN"; then
39904   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
39905 $as_echo "$DUMPBIN" >&6; }
39906 else
39907   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39908 $as_echo "no" >&6; }
39909 fi
39910 
39911 
39912 
39913   # Only process if variable expands to non-empty
39914 
39915   if test "x$DUMPBIN" != x; then
39916     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39917 
39918   # First separate the path from the arguments. This will split at the first
39919   # space.
39920   complete="$DUMPBIN"
39921   path="${complete%% *}"
39922   tmp="$complete EOL"
39923   arguments="${tmp#* }"
39924 
39925   # Input might be given as Windows format, start by converting to
39926   # unix format.
39927   new_path=`$CYGPATH -u "$path"`
39928 
39929   # Now try to locate executable using which
39930   new_path=`$WHICH "$new_path" 2> /dev/null`
39931   # bat and cmd files are not always considered executable in cygwin causing which
39932   # to not find them
39933   if test "x$new_path" = x \
39934       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39935       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39936     new_path=`$CYGPATH -u "$path"`
39937   fi
39938   if test "x$new_path" = x; then
39939     # Oops. Which didn't find the executable.
39940     # The splitting of arguments from the executable at a space might have been incorrect,
39941     # since paths with space are more likely in Windows. Give it another try with the whole
39942     # argument.
39943     path="$complete"
39944     arguments="EOL"
39945     new_path=`$CYGPATH -u "$path"`
39946     new_path=`$WHICH "$new_path" 2> /dev/null`
39947     # bat and cmd files are not always considered executable in cygwin causing which
39948     # to not find them
39949     if test "x$new_path" = x \
39950         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39951         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39952       new_path=`$CYGPATH -u "$path"`
39953     fi
39954     if test "x$new_path" = x; then
39955       # It's still not found. Now this is an unrecoverable error.
39956       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39957 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39958       has_space=`$ECHO "$complete" | $GREP " "`
39959       if test "x$has_space" != x; then
39960         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39961 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39962       fi
39963       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39964     fi
39965   fi
39966 
39967   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39968   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39969   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39970   # "foo.exe" is OK but "foo" is an error.
39971   #
39972   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39973   # It is also a way to make sure we got the proper file name for the real test later on.
39974   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39975   if test "x$test_shortpath" = x; then
39976     # Short path failed, file does not exist as specified.
39977     # Try adding .exe or .cmd
39978     if test -f "${new_path}.exe"; then
39979       input_to_shortpath="${new_path}.exe"
39980     elif test -f "${new_path}.cmd"; then
39981       input_to_shortpath="${new_path}.cmd"
39982     else
39983       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
39984 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
39985       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39986 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39987       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39988     fi
39989   else
39990     input_to_shortpath="$new_path"
39991   fi
39992 
39993   # Call helper function which possibly converts this using DOS-style short mode.
39994   # If so, the updated path is stored in $new_path.
39995   new_path="$input_to_shortpath"
39996 
39997   input_path="$input_to_shortpath"
39998   # Check if we need to convert this using DOS-style short mode. If the path
39999   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40000   # take no chances and rewrite it.
40001   # Note: m4 eats our [], so we need to use [ and ] instead.
40002   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40003   if test "x$has_forbidden_chars" != x; then
40004     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40005     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40006     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40007     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40008       # Going to short mode and back again did indeed matter. Since short mode is
40009       # case insensitive, let's make it lowercase to improve readability.
40010       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40011       # Now convert it back to Unix-style (cygpath)
40012       input_path=`$CYGPATH -u "$shortmode_path"`
40013       new_path="$input_path"
40014     fi
40015   fi
40016 
40017   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40018   if test "x$test_cygdrive_prefix" = x; then
40019     # As a simple fix, exclude /usr/bin since it's not a real path.
40020     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40021       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40022       # a path prefixed by /cygdrive for fixpath to work.
40023       new_path="$CYGWIN_ROOT_PATH$input_path"
40024     fi
40025   fi
40026 
40027   # remove trailing .exe if any
40028   new_path="${new_path/%.exe/}"
40029 
40030     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40031 
40032   # First separate the path from the arguments. This will split at the first
40033   # space.
40034   complete="$DUMPBIN"
40035   path="${complete%% *}"
40036   tmp="$complete EOL"
40037   arguments="${tmp#* }"
40038 
40039   # Input might be given as Windows format, start by converting to
40040   # unix format.
40041   new_path="$path"
40042 
40043   windows_path="$new_path"
40044   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40045     unix_path=`$CYGPATH -u "$windows_path"`
40046     new_path="$unix_path"
40047   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40048     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40049     new_path="$unix_path"
40050   fi
40051 
40052 
40053   # Now try to locate executable using which
40054   new_path=`$WHICH "$new_path" 2> /dev/null`
40055 
40056   if test "x$new_path" = x; then
40057     # Oops. Which didn't find the executable.
40058     # The splitting of arguments from the executable at a space might have been incorrect,
40059     # since paths with space are more likely in Windows. Give it another try with the whole
40060     # argument.
40061     path="$complete"
40062     arguments="EOL"
40063     new_path="$path"
40064 
40065   windows_path="$new_path"
40066   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40067     unix_path=`$CYGPATH -u "$windows_path"`
40068     new_path="$unix_path"
40069   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40070     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40071     new_path="$unix_path"
40072   fi
40073 
40074 
40075     new_path=`$WHICH "$new_path" 2> /dev/null`
40076     # bat and cmd files are not always considered executable in MSYS causing which
40077     # to not find them
40078     if test "x$new_path" = x \
40079         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40080         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40081       new_path="$path"
40082 
40083   windows_path="$new_path"
40084   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40085     unix_path=`$CYGPATH -u "$windows_path"`
40086     new_path="$unix_path"
40087   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40088     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40089     new_path="$unix_path"
40090   fi
40091 
40092     fi
40093 
40094     if test "x$new_path" = x; then
40095       # It's still not found. Now this is an unrecoverable error.
40096       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40097 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40098       has_space=`$ECHO "$complete" | $GREP " "`
40099       if test "x$has_space" != x; then
40100         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40101 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40102       fi
40103       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40104     fi
40105   fi
40106 
40107   # Now new_path has a complete unix path to the binary
40108   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40109     # Keep paths in /bin as-is, but remove trailing .exe if any
40110     new_path="${new_path/%.exe/}"
40111     # Do not save /bin paths to all_fixpath_prefixes!
40112   else
40113     # Not in mixed or Windows style, start by that.
40114     new_path=`cmd //c echo $new_path`
40115 
40116   input_path="$new_path"
40117   # Check if we need to convert this using DOS-style short mode. If the path
40118   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40119   # take no chances and rewrite it.
40120   # Note: m4 eats our [], so we need to use [ and ] instead.
40121   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40122   if test "x$has_forbidden_chars" != x; then
40123     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40124     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40125   fi
40126 
40127     # Output is in $new_path
40128 
40129   windows_path="$new_path"
40130   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40131     unix_path=`$CYGPATH -u "$windows_path"`
40132     new_path="$unix_path"
40133   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40134     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40135     new_path="$unix_path"
40136   fi
40137 
40138     # remove trailing .exe if any
40139     new_path="${new_path/%.exe/}"
40140 
40141     # Save the first 10 bytes of this path to the storage, so fixpath can work.
40142     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40143   fi
40144 
40145     else
40146       # We're on a unix platform. Hooray! :)
40147       # First separate the path from the arguments. This will split at the first
40148       # space.
40149       complete="$DUMPBIN"
40150       path="${complete%% *}"
40151       tmp="$complete EOL"
40152       arguments="${tmp#* }"
40153 
40154       # Cannot rely on the command "which" here since it doesn't always work.
40155       is_absolute_path=`$ECHO "$path" | $GREP ^/`
40156       if test -z "$is_absolute_path"; then
40157         # Path to executable is not absolute. Find it.
40158         IFS_save="$IFS"
40159         IFS=:
40160         for p in $PATH; do
40161           if test -f "$p/$path" && test -x "$p/$path"; then
40162             new_path="$p/$path"
40163             break
40164           fi
40165         done
40166         IFS="$IFS_save"
40167       else
40168         # This is an absolute path, we can use it without further modifications.
40169         new_path="$path"
40170       fi
40171 
40172       if test "x$new_path" = x; then
40173         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40174 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40175         has_space=`$ECHO "$complete" | $GREP " "`
40176         if test "x$has_space" != x; then
40177           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40178 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40179         fi
40180         as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40181       fi
40182     fi
40183 
40184     # Now join together the path and the arguments once again
40185     if test "x$arguments" != xEOL; then
40186       new_complete="$new_path ${arguments% *}"
40187     else
40188       new_complete="$new_path"
40189     fi
40190 
40191     if test "x$complete" != "x$new_complete"; then
40192       DUMPBIN="$new_complete"
40193       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
40194 $as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
40195     fi
40196   fi
40197 
40198     # We need to check for 'msbuild.exe' because at the place where we expect to
40199     # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
40200     # won't find the 'msbuild.exe' executable in that case (and the
40201     # 'ac_executable_extensions' is unusable due to performance reasons).
40202     # Notice that we intentionally don't fix up the path to MSBUILD because we
40203     # will call it in a DOS shell during freetype detection on Windows (see
40204     # 'LIB_SETUP_FREETYPE' in "libraries.m4"
40205     # Extract the first word of "msbuild.exe", so it can be a program name with args.
40206 set dummy msbuild.exe; ac_word=$2
40207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40208 $as_echo_n "checking for $ac_word... " >&6; }
40209 if ${ac_cv_prog_MSBUILD+:} false; then :
40210   $as_echo_n "(cached) " >&6
40211 else
40212   if test -n "$MSBUILD"; then
40213   ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
40214 else
40215 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40216 for as_dir in $PATH
40217 do
40218   IFS=$as_save_IFS
40219   test -z "$as_dir" && as_dir=.
40220     for ac_exec_ext in '' $ac_executable_extensions; do
40221   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40222     ac_cv_prog_MSBUILD="msbuild.exe"
40223     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40224     break 2
40225   fi
40226 done
40227   done
40228 IFS=$as_save_IFS
40229 
40230 fi
40231 fi
40232 MSBUILD=$ac_cv_prog_MSBUILD
40233 if test -n "$MSBUILD"; then
40234   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
40235 $as_echo "$MSBUILD" >&6; }
40236 else
40237   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40238 $as_echo "no" >&6; }
40239 fi
40240 
40241 
40242   fi
40243 
40244   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40245 
40246 
40247   # Publish this variable in the help.
40248 
40249 
40250   if [ -z "${STRIP+x}" ]; then
40251     # The variable is not set by user, try to locate tool using the code snippet
40252     for ac_prog in strip
40253 do
40254   # Extract the first word of "$ac_prog", so it can be a program name with args.
40255 set dummy $ac_prog; ac_word=$2
40256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40257 $as_echo_n "checking for $ac_word... " >&6; }
40258 if ${ac_cv_path_STRIP+:} false; then :
40259   $as_echo_n "(cached) " >&6
40260 else
40261   case $STRIP in
40262   [\\/]* | ?:[\\/]*)
40263   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40264   ;;
40265   *)
40266   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40267 for as_dir in $PATH
40268 do
40269   IFS=$as_save_IFS
40270   test -z "$as_dir" && as_dir=.
40271     for ac_exec_ext in '' $ac_executable_extensions; do
40272   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40273     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40274     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40275     break 2
40276   fi
40277 done
40278   done
40279 IFS=$as_save_IFS
40280 
40281   ;;
40282 esac
40283 fi
40284 STRIP=$ac_cv_path_STRIP
40285 if test -n "$STRIP"; then
40286   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40287 $as_echo "$STRIP" >&6; }
40288 else
40289   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40290 $as_echo "no" >&6; }
40291 fi
40292 
40293 
40294   test -n "$STRIP" && break
40295 done
40296 
40297   else
40298     # The variable is set, but is it from the command line or the environment?
40299 
40300     # Try to remove the string !STRIP! from our list.
40301     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
40302     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40303       # If it failed, the variable was not from the command line. Ignore it,
40304       # but warn the user (except for BASH, which is always set by the calling BASH).
40305       if test "xSTRIP" != xBASH; then
40306         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
40307 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
40308       fi
40309       # Try to locate tool using the code snippet
40310       for ac_prog in strip
40311 do
40312   # Extract the first word of "$ac_prog", so it can be a program name with args.
40313 set dummy $ac_prog; ac_word=$2
40314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40315 $as_echo_n "checking for $ac_word... " >&6; }
40316 if ${ac_cv_path_STRIP+:} false; then :
40317   $as_echo_n "(cached) " >&6
40318 else
40319   case $STRIP in
40320   [\\/]* | ?:[\\/]*)
40321   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40322   ;;
40323   *)
40324   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40325 for as_dir in $PATH
40326 do
40327   IFS=$as_save_IFS
40328   test -z "$as_dir" && as_dir=.
40329     for ac_exec_ext in '' $ac_executable_extensions; do
40330   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40331     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40332     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40333     break 2
40334   fi
40335 done
40336   done
40337 IFS=$as_save_IFS
40338 
40339   ;;
40340 esac
40341 fi
40342 STRIP=$ac_cv_path_STRIP
40343 if test -n "$STRIP"; then
40344   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40345 $as_echo "$STRIP" >&6; }
40346 else
40347   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40348 $as_echo "no" >&6; }
40349 fi
40350 
40351 
40352   test -n "$STRIP" && break
40353 done
40354 
40355     else
40356       # If it succeeded, then it was overridden by the user. We will use it
40357       # for the tool.
40358 
40359       # First remove it from the list of overridden variables, so we can test
40360       # for unknown variables in the end.
40361       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40362 
40363       # Check if we try to supply an empty value
40364       if test "x$STRIP" = x; then
40365         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
40366 $as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
40367         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40368 $as_echo_n "checking for STRIP... " >&6; }
40369         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40370 $as_echo "disabled" >&6; }
40371       else
40372         # Check if the provided tool contains a complete path.
40373         tool_specified="$STRIP"
40374         tool_basename="${tool_specified##*/}"
40375         if test "x$tool_basename" = "x$tool_specified"; then
40376           # A command without a complete path is provided, search $PATH.
40377           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
40378 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
40379           # Extract the first word of "$tool_basename", so it can be a program name with args.
40380 set dummy $tool_basename; ac_word=$2
40381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40382 $as_echo_n "checking for $ac_word... " >&6; }
40383 if ${ac_cv_path_STRIP+:} false; then :
40384   $as_echo_n "(cached) " >&6
40385 else
40386   case $STRIP in
40387   [\\/]* | ?:[\\/]*)
40388   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40389   ;;
40390   *)
40391   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40392 for as_dir in $PATH
40393 do
40394   IFS=$as_save_IFS
40395   test -z "$as_dir" && as_dir=.
40396     for ac_exec_ext in '' $ac_executable_extensions; do
40397   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40398     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40399     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40400     break 2
40401   fi
40402 done
40403   done
40404 IFS=$as_save_IFS
40405 
40406   ;;
40407 esac
40408 fi
40409 STRIP=$ac_cv_path_STRIP
40410 if test -n "$STRIP"; then
40411   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40412 $as_echo "$STRIP" >&6; }
40413 else
40414   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40415 $as_echo "no" >&6; }
40416 fi
40417 
40418 
40419           if test "x$STRIP" = x; then
40420             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40421           fi
40422         else
40423           # Otherwise we believe it is a complete path. Use it as it is.
40424           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
40425 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
40426           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40427 $as_echo_n "checking for STRIP... " >&6; }
40428           if test ! -x "$tool_specified"; then
40429             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40430 $as_echo "not found" >&6; }
40431             as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
40432           fi
40433           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40434 $as_echo "$tool_specified" >&6; }
40435         fi
40436       fi
40437     fi
40438 
40439   fi
40440 
40441 
40442 
40443   # Only process if variable expands to non-empty
40444 
40445   if test "x$STRIP" != x; then
40446     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40447 
40448   # First separate the path from the arguments. This will split at the first
40449   # space.
40450   complete="$STRIP"
40451   path="${complete%% *}"
40452   tmp="$complete EOL"
40453   arguments="${tmp#* }"
40454 
40455   # Input might be given as Windows format, start by converting to
40456   # unix format.
40457   new_path=`$CYGPATH -u "$path"`
40458 
40459   # Now try to locate executable using which
40460   new_path=`$WHICH "$new_path" 2> /dev/null`
40461   # bat and cmd files are not always considered executable in cygwin causing which
40462   # to not find them
40463   if test "x$new_path" = x \
40464       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40465       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40466     new_path=`$CYGPATH -u "$path"`
40467   fi
40468   if test "x$new_path" = x; then
40469     # Oops. Which didn't find the executable.
40470     # The splitting of arguments from the executable at a space might have been incorrect,
40471     # since paths with space are more likely in Windows. Give it another try with the whole
40472     # argument.
40473     path="$complete"
40474     arguments="EOL"
40475     new_path=`$CYGPATH -u "$path"`
40476     new_path=`$WHICH "$new_path" 2> /dev/null`
40477     # bat and cmd files are not always considered executable in cygwin causing which
40478     # to not find them
40479     if test "x$new_path" = x \
40480         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40481         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40482       new_path=`$CYGPATH -u "$path"`
40483     fi
40484     if test "x$new_path" = x; then
40485       # It's still not found. Now this is an unrecoverable error.
40486       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40487 $as_echo "$as_me: The path of STRIP, 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}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40491 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40492       fi
40493       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40494     fi
40495   fi
40496 
40497   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40498   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40499   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40500   # "foo.exe" is OK but "foo" is an error.
40501   #
40502   # This test is therefore slightly more accurate than "test -f" to check for file presence.
40503   # It is also a way to make sure we got the proper file name for the real test later on.
40504   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40505   if test "x$test_shortpath" = x; then
40506     # Short path failed, file does not exist as specified.
40507     # Try adding .exe or .cmd
40508     if test -f "${new_path}.exe"; then
40509       input_to_shortpath="${new_path}.exe"
40510     elif test -f "${new_path}.cmd"; then
40511       input_to_shortpath="${new_path}.cmd"
40512     else
40513       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
40514 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
40515       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40516 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40517       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40518     fi
40519   else
40520     input_to_shortpath="$new_path"
40521   fi
40522 
40523   # Call helper function which possibly converts this using DOS-style short mode.
40524   # If so, the updated path is stored in $new_path.
40525   new_path="$input_to_shortpath"
40526 
40527   input_path="$input_to_shortpath"
40528   # Check if we need to convert this using DOS-style short mode. If the path
40529   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40530   # take no chances and rewrite it.
40531   # Note: m4 eats our [], so we need to use [ and ] instead.
40532   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40533   if test "x$has_forbidden_chars" != x; then
40534     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40535     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40536     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40537     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40538       # Going to short mode and back again did indeed matter. Since short mode is
40539       # case insensitive, let's make it lowercase to improve readability.
40540       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40541       # Now convert it back to Unix-style (cygpath)
40542       input_path=`$CYGPATH -u "$shortmode_path"`
40543       new_path="$input_path"
40544     fi
40545   fi
40546 
40547   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40548   if test "x$test_cygdrive_prefix" = x; then
40549     # As a simple fix, exclude /usr/bin since it's not a real path.
40550     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40551       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40552       # a path prefixed by /cygdrive for fixpath to work.
40553       new_path="$CYGWIN_ROOT_PATH$input_path"
40554     fi
40555   fi
40556 
40557   # remove trailing .exe if any
40558   new_path="${new_path/%.exe/}"
40559 
40560     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40561 
40562   # First separate the path from the arguments. This will split at the first
40563   # space.
40564   complete="$STRIP"
40565   path="${complete%% *}"
40566   tmp="$complete EOL"
40567   arguments="${tmp#* }"
40568 
40569   # Input might be given as Windows format, start by converting to
40570   # unix format.
40571   new_path="$path"
40572 
40573   windows_path="$new_path"
40574   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40575     unix_path=`$CYGPATH -u "$windows_path"`
40576     new_path="$unix_path"
40577   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40578     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40579     new_path="$unix_path"
40580   fi
40581 
40582 
40583   # Now try to locate executable using which
40584   new_path=`$WHICH "$new_path" 2> /dev/null`
40585 
40586   if test "x$new_path" = x; then
40587     # Oops. Which didn't find the executable.
40588     # The splitting of arguments from the executable at a space might have been incorrect,
40589     # since paths with space are more likely in Windows. Give it another try with the whole
40590     # argument.
40591     path="$complete"
40592     arguments="EOL"
40593     new_path="$path"
40594 
40595   windows_path="$new_path"
40596   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40597     unix_path=`$CYGPATH -u "$windows_path"`
40598     new_path="$unix_path"
40599   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40600     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40601     new_path="$unix_path"
40602   fi
40603 
40604 
40605     new_path=`$WHICH "$new_path" 2> /dev/null`
40606     # bat and cmd files are not always considered executable in MSYS causing which
40607     # to not find them
40608     if test "x$new_path" = x \
40609         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40610         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40611       new_path="$path"
40612 
40613   windows_path="$new_path"
40614   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40615     unix_path=`$CYGPATH -u "$windows_path"`
40616     new_path="$unix_path"
40617   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40618     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40619     new_path="$unix_path"
40620   fi
40621 
40622     fi
40623 
40624     if test "x$new_path" = x; then
40625       # It's still not found. Now this is an unrecoverable error.
40626       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40627 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40628       has_space=`$ECHO "$complete" | $GREP " "`
40629       if test "x$has_space" != x; then
40630         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40631 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40632       fi
40633       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40634     fi
40635   fi
40636 
40637   # Now new_path has a complete unix path to the binary
40638   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40639     # Keep paths in /bin as-is, but remove trailing .exe if any
40640     new_path="${new_path/%.exe/}"
40641     # Do not save /bin paths to all_fixpath_prefixes!
40642   else
40643     # Not in mixed or Windows style, start by that.
40644     new_path=`cmd //c echo $new_path`
40645 
40646   input_path="$new_path"
40647   # Check if we need to convert this using DOS-style short mode. If the path
40648   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40649   # take no chances and rewrite it.
40650   # Note: m4 eats our [], so we need to use [ and ] instead.
40651   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40652   if test "x$has_forbidden_chars" != x; then
40653     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40654     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40655   fi
40656 
40657     # Output is in $new_path
40658 
40659   windows_path="$new_path"
40660   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40661     unix_path=`$CYGPATH -u "$windows_path"`
40662     new_path="$unix_path"
40663   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40664     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40665     new_path="$unix_path"
40666   fi
40667 
40668     # remove trailing .exe if any
40669     new_path="${new_path/%.exe/}"
40670 
40671     # Save the first 10 bytes of this path to the storage, so fixpath can work.
40672     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40673   fi
40674 
40675     else
40676       # We're on a unix platform. Hooray! :)
40677       # First separate the path from the arguments. This will split at the first
40678       # space.
40679       complete="$STRIP"
40680       path="${complete%% *}"
40681       tmp="$complete EOL"
40682       arguments="${tmp#* }"
40683 
40684       # Cannot rely on the command "which" here since it doesn't always work.
40685       is_absolute_path=`$ECHO "$path" | $GREP ^/`
40686       if test -z "$is_absolute_path"; then
40687         # Path to executable is not absolute. Find it.
40688         IFS_save="$IFS"
40689         IFS=:
40690         for p in $PATH; do
40691           if test -f "$p/$path" && test -x "$p/$path"; then
40692             new_path="$p/$path"
40693             break
40694           fi
40695         done
40696         IFS="$IFS_save"
40697       else
40698         # This is an absolute path, we can use it without further modifications.
40699         new_path="$path"
40700       fi
40701 
40702       if test "x$new_path" = x; then
40703         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40704 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40705         has_space=`$ECHO "$complete" | $GREP " "`
40706         if test "x$has_space" != x; then
40707           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40708 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40709         fi
40710         as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40711       fi
40712     fi
40713 
40714     # Now join together the path and the arguments once again
40715     if test "x$arguments" != xEOL; then
40716       new_complete="$new_path ${arguments% *}"
40717     else
40718       new_complete="$new_path"
40719     fi
40720 
40721     if test "x$complete" != "x$new_complete"; then
40722       STRIP="$new_complete"
40723       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40724 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40725     fi
40726   fi
40727 
40728 
40729 
40730   # Publish this variable in the help.
40731 
40732 
40733   if [ -z "${NM+x}" ]; then
40734     # The variable is not set by user, try to locate tool using the code snippet
40735     for ac_prog in nm
40736 do
40737   # Extract the first word of "$ac_prog", so it can be a program name with args.
40738 set dummy $ac_prog; ac_word=$2
40739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40740 $as_echo_n "checking for $ac_word... " >&6; }
40741 if ${ac_cv_path_NM+:} false; then :
40742   $as_echo_n "(cached) " >&6
40743 else
40744   case $NM in
40745   [\\/]* | ?:[\\/]*)
40746   ac_cv_path_NM="$NM" # Let the user override the test with a path.
40747   ;;
40748   *)
40749   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40750 for as_dir in $PATH
40751 do
40752   IFS=$as_save_IFS
40753   test -z "$as_dir" && as_dir=.
40754     for ac_exec_ext in '' $ac_executable_extensions; do
40755   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40756     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40757     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40758     break 2
40759   fi
40760 done
40761   done
40762 IFS=$as_save_IFS
40763 
40764   ;;
40765 esac
40766 fi
40767 NM=$ac_cv_path_NM
40768 if test -n "$NM"; then
40769   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40770 $as_echo "$NM" >&6; }
40771 else
40772   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40773 $as_echo "no" >&6; }
40774 fi
40775 
40776 
40777   test -n "$NM" && break
40778 done
40779 
40780   else
40781     # The variable is set, but is it from the command line or the environment?
40782 
40783     # Try to remove the string !NM! from our list.
40784     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40785     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40786       # If it failed, the variable was not from the command line. Ignore it,
40787       # but warn the user (except for BASH, which is always set by the calling BASH).
40788       if test "xNM" != xBASH; then
40789         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40790 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40791       fi
40792       # Try to locate tool using the code snippet
40793       for ac_prog in nm
40794 do
40795   # Extract the first word of "$ac_prog", so it can be a program name with args.
40796 set dummy $ac_prog; ac_word=$2
40797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40798 $as_echo_n "checking for $ac_word... " >&6; }
40799 if ${ac_cv_path_NM+:} false; then :
40800   $as_echo_n "(cached) " >&6
40801 else
40802   case $NM in
40803   [\\/]* | ?:[\\/]*)
40804   ac_cv_path_NM="$NM" # Let the user override the test with a path.
40805   ;;
40806   *)
40807   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40808 for as_dir in $PATH
40809 do
40810   IFS=$as_save_IFS
40811   test -z "$as_dir" && as_dir=.
40812     for ac_exec_ext in '' $ac_executable_extensions; do
40813   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40814     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40815     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40816     break 2
40817   fi
40818 done
40819   done
40820 IFS=$as_save_IFS
40821 
40822   ;;
40823 esac
40824 fi
40825 NM=$ac_cv_path_NM
40826 if test -n "$NM"; then
40827   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40828 $as_echo "$NM" >&6; }
40829 else
40830   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40831 $as_echo "no" >&6; }
40832 fi
40833 
40834 
40835   test -n "$NM" && break
40836 done
40837 
40838     else
40839       # If it succeeded, then it was overridden by the user. We will use it
40840       # for the tool.
40841 
40842       # First remove it from the list of overridden variables, so we can test
40843       # for unknown variables in the end.
40844       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40845 
40846       # Check if we try to supply an empty value
40847       if test "x$NM" = x; then
40848         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40849 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40850         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40851 $as_echo_n "checking for NM... " >&6; }
40852         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40853 $as_echo "disabled" >&6; }
40854       else
40855         # Check if the provided tool contains a complete path.
40856         tool_specified="$NM"
40857         tool_basename="${tool_specified##*/}"
40858         if test "x$tool_basename" = "x$tool_specified"; then
40859           # A command without a complete path is provided, search $PATH.
40860           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40861 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40862           # Extract the first word of "$tool_basename", so it can be a program name with args.
40863 set dummy $tool_basename; ac_word=$2
40864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40865 $as_echo_n "checking for $ac_word... " >&6; }
40866 if ${ac_cv_path_NM+:} false; then :
40867   $as_echo_n "(cached) " >&6
40868 else
40869   case $NM in
40870   [\\/]* | ?:[\\/]*)
40871   ac_cv_path_NM="$NM" # Let the user override the test with a path.
40872   ;;
40873   *)
40874   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40875 for as_dir in $PATH
40876 do
40877   IFS=$as_save_IFS
40878   test -z "$as_dir" && as_dir=.
40879     for ac_exec_ext in '' $ac_executable_extensions; do
40880   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40881     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40882     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40883     break 2
40884   fi
40885 done
40886   done
40887 IFS=$as_save_IFS
40888 
40889   ;;
40890 esac
40891 fi
40892 NM=$ac_cv_path_NM
40893 if test -n "$NM"; then
40894   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40895 $as_echo "$NM" >&6; }
40896 else
40897   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40898 $as_echo "no" >&6; }
40899 fi
40900 
40901 
40902           if test "x$NM" = x; then
40903             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40904           fi
40905         else
40906           # Otherwise we believe it is a complete path. Use it as it is.
40907           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40908 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40909           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40910 $as_echo_n "checking for NM... " >&6; }
40911           if test ! -x "$tool_specified"; then
40912             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40913 $as_echo "not found" >&6; }
40914             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40915           fi
40916           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40917 $as_echo "$tool_specified" >&6; }
40918         fi
40919       fi
40920     fi
40921 
40922   fi
40923 
40924 
40925 
40926   # Only process if variable expands to non-empty
40927 
40928   if test "x$NM" != x; then
40929     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40930 
40931   # First separate the path from the arguments. This will split at the first
40932   # space.
40933   complete="$NM"
40934   path="${complete%% *}"
40935   tmp="$complete EOL"
40936   arguments="${tmp#* }"
40937 
40938   # Input might be given as Windows format, start by converting to
40939   # unix format.
40940   new_path=`$CYGPATH -u "$path"`
40941 
40942   # Now try to locate executable using which
40943   new_path=`$WHICH "$new_path" 2> /dev/null`
40944   # bat and cmd files are not always considered executable in cygwin causing which
40945   # to not find them
40946   if test "x$new_path" = x \
40947       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40948       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40949     new_path=`$CYGPATH -u "$path"`
40950   fi
40951   if test "x$new_path" = x; then
40952     # Oops. Which didn't find the executable.
40953     # The splitting of arguments from the executable at a space might have been incorrect,
40954     # since paths with space are more likely in Windows. Give it another try with the whole
40955     # argument.
40956     path="$complete"
40957     arguments="EOL"
40958     new_path=`$CYGPATH -u "$path"`
40959     new_path=`$WHICH "$new_path" 2> /dev/null`
40960     # bat and cmd files are not always considered executable in cygwin causing which
40961     # to not find them
40962     if test "x$new_path" = x \
40963         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40964         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40965       new_path=`$CYGPATH -u "$path"`
40966     fi
40967     if test "x$new_path" = x; then
40968       # It's still not found. Now this is an unrecoverable error.
40969       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40970 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40971       has_space=`$ECHO "$complete" | $GREP " "`
40972       if test "x$has_space" != x; then
40973         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40974 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40975       fi
40976       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40977     fi
40978   fi
40979 
40980   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40981   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40982   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40983   # "foo.exe" is OK but "foo" is an error.
40984   #
40985   # This test is therefore slightly more accurate than "test -f" to check for file presence.
40986   # It is also a way to make sure we got the proper file name for the real test later on.
40987   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40988   if test "x$test_shortpath" = x; then
40989     # Short path failed, file does not exist as specified.
40990     # Try adding .exe or .cmd
40991     if test -f "${new_path}.exe"; then
40992       input_to_shortpath="${new_path}.exe"
40993     elif test -f "${new_path}.cmd"; then
40994       input_to_shortpath="${new_path}.cmd"
40995     else
40996       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
40997 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
40998       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40999 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41000       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41001     fi
41002   else
41003     input_to_shortpath="$new_path"
41004   fi
41005 
41006   # Call helper function which possibly converts this using DOS-style short mode.
41007   # If so, the updated path is stored in $new_path.
41008   new_path="$input_to_shortpath"
41009 
41010   input_path="$input_to_shortpath"
41011   # Check if we need to convert this using DOS-style short mode. If the path
41012   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41013   # take no chances and rewrite it.
41014   # Note: m4 eats our [], so we need to use [ and ] instead.
41015   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41016   if test "x$has_forbidden_chars" != x; then
41017     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41018     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41019     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41020     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41021       # Going to short mode and back again did indeed matter. Since short mode is
41022       # case insensitive, let's make it lowercase to improve readability.
41023       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41024       # Now convert it back to Unix-style (cygpath)
41025       input_path=`$CYGPATH -u "$shortmode_path"`
41026       new_path="$input_path"
41027     fi
41028   fi
41029 
41030   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41031   if test "x$test_cygdrive_prefix" = x; then
41032     # As a simple fix, exclude /usr/bin since it's not a real path.
41033     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41034       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41035       # a path prefixed by /cygdrive for fixpath to work.
41036       new_path="$CYGWIN_ROOT_PATH$input_path"
41037     fi
41038   fi
41039 
41040   # remove trailing .exe if any
41041   new_path="${new_path/%.exe/}"
41042 
41043     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41044 
41045   # First separate the path from the arguments. This will split at the first
41046   # space.
41047   complete="$NM"
41048   path="${complete%% *}"
41049   tmp="$complete EOL"
41050   arguments="${tmp#* }"
41051 
41052   # Input might be given as Windows format, start by converting to
41053   # unix format.
41054   new_path="$path"
41055 
41056   windows_path="$new_path"
41057   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41058     unix_path=`$CYGPATH -u "$windows_path"`
41059     new_path="$unix_path"
41060   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41061     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41062     new_path="$unix_path"
41063   fi
41064 
41065 
41066   # Now try to locate executable using which
41067   new_path=`$WHICH "$new_path" 2> /dev/null`
41068 
41069   if test "x$new_path" = x; then
41070     # Oops. Which didn't find the executable.
41071     # The splitting of arguments from the executable at a space might have been incorrect,
41072     # since paths with space are more likely in Windows. Give it another try with the whole
41073     # argument.
41074     path="$complete"
41075     arguments="EOL"
41076     new_path="$path"
41077 
41078   windows_path="$new_path"
41079   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41080     unix_path=`$CYGPATH -u "$windows_path"`
41081     new_path="$unix_path"
41082   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41083     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41084     new_path="$unix_path"
41085   fi
41086 
41087 
41088     new_path=`$WHICH "$new_path" 2> /dev/null`
41089     # bat and cmd files are not always considered executable in MSYS causing which
41090     # to not find them
41091     if test "x$new_path" = x \
41092         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41093         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41094       new_path="$path"
41095 
41096   windows_path="$new_path"
41097   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41098     unix_path=`$CYGPATH -u "$windows_path"`
41099     new_path="$unix_path"
41100   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41101     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41102     new_path="$unix_path"
41103   fi
41104 
41105     fi
41106 
41107     if test "x$new_path" = x; then
41108       # It's still not found. Now this is an unrecoverable error.
41109       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41110 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41111       has_space=`$ECHO "$complete" | $GREP " "`
41112       if test "x$has_space" != x; then
41113         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41114 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41115       fi
41116       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41117     fi
41118   fi
41119 
41120   # Now new_path has a complete unix path to the binary
41121   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41122     # Keep paths in /bin as-is, but remove trailing .exe if any
41123     new_path="${new_path/%.exe/}"
41124     # Do not save /bin paths to all_fixpath_prefixes!
41125   else
41126     # Not in mixed or Windows style, start by that.
41127     new_path=`cmd //c echo $new_path`
41128 
41129   input_path="$new_path"
41130   # Check if we need to convert this using DOS-style short mode. If the path
41131   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41132   # take no chances and rewrite it.
41133   # Note: m4 eats our [], so we need to use [ and ] instead.
41134   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41135   if test "x$has_forbidden_chars" != x; then
41136     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41137     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41138   fi
41139 
41140     # Output is in $new_path
41141 
41142   windows_path="$new_path"
41143   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41144     unix_path=`$CYGPATH -u "$windows_path"`
41145     new_path="$unix_path"
41146   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41147     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41148     new_path="$unix_path"
41149   fi
41150 
41151     # remove trailing .exe if any
41152     new_path="${new_path/%.exe/}"
41153 
41154     # Save the first 10 bytes of this path to the storage, so fixpath can work.
41155     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41156   fi
41157 
41158     else
41159       # We're on a unix platform. Hooray! :)
41160       # First separate the path from the arguments. This will split at the first
41161       # space.
41162       complete="$NM"
41163       path="${complete%% *}"
41164       tmp="$complete EOL"
41165       arguments="${tmp#* }"
41166 
41167       # Cannot rely on the command "which" here since it doesn't always work.
41168       is_absolute_path=`$ECHO "$path" | $GREP ^/`
41169       if test -z "$is_absolute_path"; then
41170         # Path to executable is not absolute. Find it.
41171         IFS_save="$IFS"
41172         IFS=:
41173         for p in $PATH; do
41174           if test -f "$p/$path" && test -x "$p/$path"; then
41175             new_path="$p/$path"
41176             break
41177           fi
41178         done
41179         IFS="$IFS_save"
41180       else
41181         # This is an absolute path, we can use it without further modifications.
41182         new_path="$path"
41183       fi
41184 
41185       if test "x$new_path" = x; then
41186         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41187 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41188         has_space=`$ECHO "$complete" | $GREP " "`
41189         if test "x$has_space" != x; then
41190           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41191 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41192         fi
41193         as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41194       fi
41195     fi
41196 
41197     # Now join together the path and the arguments once again
41198     if test "x$arguments" != xEOL; then
41199       new_complete="$new_path ${arguments% *}"
41200     else
41201       new_complete="$new_path"
41202     fi
41203 
41204     if test "x$complete" != "x$new_complete"; then
41205       NM="$new_complete"
41206       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
41207 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
41208     fi
41209   fi
41210 
41211 
41212 
41213   # Publish this variable in the help.
41214 
41215 
41216   if [ -z "${GNM+x}" ]; then
41217     # The variable is not set by user, try to locate tool using the code snippet
41218     for ac_prog in gnm
41219 do
41220   # Extract the first word of "$ac_prog", so it can be a program name with args.
41221 set dummy $ac_prog; ac_word=$2
41222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41223 $as_echo_n "checking for $ac_word... " >&6; }
41224 if ${ac_cv_path_GNM+:} false; then :
41225   $as_echo_n "(cached) " >&6
41226 else
41227   case $GNM in
41228   [\\/]* | ?:[\\/]*)
41229   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41230   ;;
41231   *)
41232   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41233 for as_dir in $PATH
41234 do
41235   IFS=$as_save_IFS
41236   test -z "$as_dir" && as_dir=.
41237     for ac_exec_ext in '' $ac_executable_extensions; do
41238   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41239     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41240     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41241     break 2
41242   fi
41243 done
41244   done
41245 IFS=$as_save_IFS
41246 
41247   ;;
41248 esac
41249 fi
41250 GNM=$ac_cv_path_GNM
41251 if test -n "$GNM"; then
41252   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41253 $as_echo "$GNM" >&6; }
41254 else
41255   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41256 $as_echo "no" >&6; }
41257 fi
41258 
41259 
41260   test -n "$GNM" && break
41261 done
41262 
41263   else
41264     # The variable is set, but is it from the command line or the environment?
41265 
41266     # Try to remove the string !GNM! from our list.
41267     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
41268     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41269       # If it failed, the variable was not from the command line. Ignore it,
41270       # but warn the user (except for BASH, which is always set by the calling BASH).
41271       if test "xGNM" != xBASH; then
41272         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
41273 $as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
41274       fi
41275       # Try to locate tool using the code snippet
41276       for ac_prog in gnm
41277 do
41278   # Extract the first word of "$ac_prog", so it can be a program name with args.
41279 set dummy $ac_prog; ac_word=$2
41280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41281 $as_echo_n "checking for $ac_word... " >&6; }
41282 if ${ac_cv_path_GNM+:} false; then :
41283   $as_echo_n "(cached) " >&6
41284 else
41285   case $GNM in
41286   [\\/]* | ?:[\\/]*)
41287   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41288   ;;
41289   *)
41290   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41291 for as_dir in $PATH
41292 do
41293   IFS=$as_save_IFS
41294   test -z "$as_dir" && as_dir=.
41295     for ac_exec_ext in '' $ac_executable_extensions; do
41296   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41297     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41298     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41299     break 2
41300   fi
41301 done
41302   done
41303 IFS=$as_save_IFS
41304 
41305   ;;
41306 esac
41307 fi
41308 GNM=$ac_cv_path_GNM
41309 if test -n "$GNM"; then
41310   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41311 $as_echo "$GNM" >&6; }
41312 else
41313   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41314 $as_echo "no" >&6; }
41315 fi
41316 
41317 
41318   test -n "$GNM" && break
41319 done
41320 
41321     else
41322       # If it succeeded, then it was overridden by the user. We will use it
41323       # for the tool.
41324 
41325       # First remove it from the list of overridden variables, so we can test
41326       # for unknown variables in the end.
41327       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41328 
41329       # Check if we try to supply an empty value
41330       if test "x$GNM" = x; then
41331         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
41332 $as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
41333         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
41334 $as_echo_n "checking for GNM... " >&6; }
41335         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41336 $as_echo "disabled" >&6; }
41337       else
41338         # Check if the provided tool contains a complete path.
41339         tool_specified="$GNM"
41340         tool_basename="${tool_specified##*/}"
41341         if test "x$tool_basename" = "x$tool_specified"; then
41342           # A command without a complete path is provided, search $PATH.
41343           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
41344 $as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
41345           # Extract the first word of "$tool_basename", so it can be a program name with args.
41346 set dummy $tool_basename; ac_word=$2
41347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41348 $as_echo_n "checking for $ac_word... " >&6; }
41349 if ${ac_cv_path_GNM+:} false; then :
41350   $as_echo_n "(cached) " >&6
41351 else
41352   case $GNM in
41353   [\\/]* | ?:[\\/]*)
41354   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41355   ;;
41356   *)
41357   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41358 for as_dir in $PATH
41359 do
41360   IFS=$as_save_IFS
41361   test -z "$as_dir" && as_dir=.
41362     for ac_exec_ext in '' $ac_executable_extensions; do
41363   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41364     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41365     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41366     break 2
41367   fi
41368 done
41369   done
41370 IFS=$as_save_IFS
41371 
41372   ;;
41373 esac
41374 fi
41375 GNM=$ac_cv_path_GNM
41376 if test -n "$GNM"; then
41377   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41378 $as_echo "$GNM" >&6; }
41379 else
41380   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41381 $as_echo "no" >&6; }
41382 fi
41383 
41384 
41385           if test "x$GNM" = x; then
41386             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41387           fi
41388         else
41389           # Otherwise we believe it is a complete path. Use it as it is.
41390           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
41391 $as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
41392           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
41393 $as_echo_n "checking for GNM... " >&6; }
41394           if test ! -x "$tool_specified"; then
41395             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41396 $as_echo "not found" >&6; }
41397             as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
41398           fi
41399           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41400 $as_echo "$tool_specified" >&6; }
41401         fi
41402       fi
41403     fi
41404 
41405   fi
41406 
41407 
41408 
41409   # Only process if variable expands to non-empty
41410 
41411   if test "x$GNM" != x; then
41412     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41413 
41414   # First separate the path from the arguments. This will split at the first
41415   # space.
41416   complete="$GNM"
41417   path="${complete%% *}"
41418   tmp="$complete EOL"
41419   arguments="${tmp#* }"
41420 
41421   # Input might be given as Windows format, start by converting to
41422   # unix format.
41423   new_path=`$CYGPATH -u "$path"`
41424 
41425   # Now try to locate executable using which
41426   new_path=`$WHICH "$new_path" 2> /dev/null`
41427   # bat and cmd files are not always considered executable in cygwin causing which
41428   # to not find them
41429   if test "x$new_path" = x \
41430       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41431       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41432     new_path=`$CYGPATH -u "$path"`
41433   fi
41434   if test "x$new_path" = x; then
41435     # Oops. Which didn't find the executable.
41436     # The splitting of arguments from the executable at a space might have been incorrect,
41437     # since paths with space are more likely in Windows. Give it another try with the whole
41438     # argument.
41439     path="$complete"
41440     arguments="EOL"
41441     new_path=`$CYGPATH -u "$path"`
41442     new_path=`$WHICH "$new_path" 2> /dev/null`
41443     # bat and cmd files are not always considered executable in cygwin causing which
41444     # to not find them
41445     if test "x$new_path" = x \
41446         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41447         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41448       new_path=`$CYGPATH -u "$path"`
41449     fi
41450     if test "x$new_path" = x; then
41451       # It's still not found. Now this is an unrecoverable error.
41452       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41453 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41454       has_space=`$ECHO "$complete" | $GREP " "`
41455       if test "x$has_space" != x; then
41456         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41457 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41458       fi
41459       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41460     fi
41461   fi
41462 
41463   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41464   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41465   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41466   # "foo.exe" is OK but "foo" is an error.
41467   #
41468   # This test is therefore slightly more accurate than "test -f" to check for file presence.
41469   # It is also a way to make sure we got the proper file name for the real test later on.
41470   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41471   if test "x$test_shortpath" = x; then
41472     # Short path failed, file does not exist as specified.
41473     # Try adding .exe or .cmd
41474     if test -f "${new_path}.exe"; then
41475       input_to_shortpath="${new_path}.exe"
41476     elif test -f "${new_path}.cmd"; then
41477       input_to_shortpath="${new_path}.cmd"
41478     else
41479       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
41480 $as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
41481       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41482 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41483       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41484     fi
41485   else
41486     input_to_shortpath="$new_path"
41487   fi
41488 
41489   # Call helper function which possibly converts this using DOS-style short mode.
41490   # If so, the updated path is stored in $new_path.
41491   new_path="$input_to_shortpath"
41492 
41493   input_path="$input_to_shortpath"
41494   # Check if we need to convert this using DOS-style short mode. If the path
41495   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41496   # take no chances and rewrite it.
41497   # Note: m4 eats our [], so we need to use [ and ] instead.
41498   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41499   if test "x$has_forbidden_chars" != x; then
41500     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41501     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41502     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41503     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41504       # Going to short mode and back again did indeed matter. Since short mode is
41505       # case insensitive, let's make it lowercase to improve readability.
41506       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41507       # Now convert it back to Unix-style (cygpath)
41508       input_path=`$CYGPATH -u "$shortmode_path"`
41509       new_path="$input_path"
41510     fi
41511   fi
41512 
41513   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41514   if test "x$test_cygdrive_prefix" = x; then
41515     # As a simple fix, exclude /usr/bin since it's not a real path.
41516     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41517       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41518       # a path prefixed by /cygdrive for fixpath to work.
41519       new_path="$CYGWIN_ROOT_PATH$input_path"
41520     fi
41521   fi
41522 
41523   # remove trailing .exe if any
41524   new_path="${new_path/%.exe/}"
41525 
41526     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41527 
41528   # First separate the path from the arguments. This will split at the first
41529   # space.
41530   complete="$GNM"
41531   path="${complete%% *}"
41532   tmp="$complete EOL"
41533   arguments="${tmp#* }"
41534 
41535   # Input might be given as Windows format, start by converting to
41536   # unix format.
41537   new_path="$path"
41538 
41539   windows_path="$new_path"
41540   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41541     unix_path=`$CYGPATH -u "$windows_path"`
41542     new_path="$unix_path"
41543   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41544     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41545     new_path="$unix_path"
41546   fi
41547 
41548 
41549   # Now try to locate executable using which
41550   new_path=`$WHICH "$new_path" 2> /dev/null`
41551 
41552   if test "x$new_path" = x; then
41553     # Oops. Which didn't find the executable.
41554     # The splitting of arguments from the executable at a space might have been incorrect,
41555     # since paths with space are more likely in Windows. Give it another try with the whole
41556     # argument.
41557     path="$complete"
41558     arguments="EOL"
41559     new_path="$path"
41560 
41561   windows_path="$new_path"
41562   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41563     unix_path=`$CYGPATH -u "$windows_path"`
41564     new_path="$unix_path"
41565   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41566     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41567     new_path="$unix_path"
41568   fi
41569 
41570 
41571     new_path=`$WHICH "$new_path" 2> /dev/null`
41572     # bat and cmd files are not always considered executable in MSYS causing which
41573     # to not find them
41574     if test "x$new_path" = x \
41575         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41576         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41577       new_path="$path"
41578 
41579   windows_path="$new_path"
41580   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41581     unix_path=`$CYGPATH -u "$windows_path"`
41582     new_path="$unix_path"
41583   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41584     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41585     new_path="$unix_path"
41586   fi
41587 
41588     fi
41589 
41590     if test "x$new_path" = x; then
41591       # It's still not found. Now this is an unrecoverable error.
41592       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41593 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41594       has_space=`$ECHO "$complete" | $GREP " "`
41595       if test "x$has_space" != x; then
41596         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41597 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41598       fi
41599       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41600     fi
41601   fi
41602 
41603   # Now new_path has a complete unix path to the binary
41604   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41605     # Keep paths in /bin as-is, but remove trailing .exe if any
41606     new_path="${new_path/%.exe/}"
41607     # Do not save /bin paths to all_fixpath_prefixes!
41608   else
41609     # Not in mixed or Windows style, start by that.
41610     new_path=`cmd //c echo $new_path`
41611 
41612   input_path="$new_path"
41613   # Check if we need to convert this using DOS-style short mode. If the path
41614   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41615   # take no chances and rewrite it.
41616   # Note: m4 eats our [], so we need to use [ and ] instead.
41617   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41618   if test "x$has_forbidden_chars" != x; then
41619     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41620     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41621   fi
41622 
41623     # Output is in $new_path
41624 
41625   windows_path="$new_path"
41626   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41627     unix_path=`$CYGPATH -u "$windows_path"`
41628     new_path="$unix_path"
41629   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41630     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41631     new_path="$unix_path"
41632   fi
41633 
41634     # remove trailing .exe if any
41635     new_path="${new_path/%.exe/}"
41636 
41637     # Save the first 10 bytes of this path to the storage, so fixpath can work.
41638     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41639   fi
41640 
41641     else
41642       # We're on a unix platform. Hooray! :)
41643       # First separate the path from the arguments. This will split at the first
41644       # space.
41645       complete="$GNM"
41646       path="${complete%% *}"
41647       tmp="$complete EOL"
41648       arguments="${tmp#* }"
41649 
41650       # Cannot rely on the command "which" here since it doesn't always work.
41651       is_absolute_path=`$ECHO "$path" | $GREP ^/`
41652       if test -z "$is_absolute_path"; then
41653         # Path to executable is not absolute. Find it.
41654         IFS_save="$IFS"
41655         IFS=:
41656         for p in $PATH; do
41657           if test -f "$p/$path" && test -x "$p/$path"; then
41658             new_path="$p/$path"
41659             break
41660           fi
41661         done
41662         IFS="$IFS_save"
41663       else
41664         # This is an absolute path, we can use it without further modifications.
41665         new_path="$path"
41666       fi
41667 
41668       if test "x$new_path" = x; then
41669         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41670 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41671         has_space=`$ECHO "$complete" | $GREP " "`
41672         if test "x$has_space" != x; then
41673           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41674 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41675         fi
41676         as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41677       fi
41678     fi
41679 
41680     # Now join together the path and the arguments once again
41681     if test "x$arguments" != xEOL; then
41682       new_complete="$new_path ${arguments% *}"
41683     else
41684       new_complete="$new_path"
41685     fi
41686 
41687     if test "x$complete" != "x$new_complete"; then
41688       GNM="$new_complete"
41689       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
41690 $as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
41691     fi
41692   fi
41693 
41694   elif test "x$OPENJDK_TARGET_OS" != xwindows; then
41695     # FIXME: we should unify this with the solaris case above.
41696 
41697 
41698   # Publish this variable in the help.
41699 
41700 
41701   if [ -z "${STRIP+x}" ]; then
41702     # The variable is not set by user, try to locate tool using the code snippet
41703     if test -n "$ac_tool_prefix"; then
41704   for ac_prog in strip
41705   do
41706     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41707 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41709 $as_echo_n "checking for $ac_word... " >&6; }
41710 if ${ac_cv_prog_STRIP+:} false; then :
41711   $as_echo_n "(cached) " >&6
41712 else
41713   if test -n "$STRIP"; then
41714   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41715 else
41716 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41717 for as_dir in $PATH
41718 do
41719   IFS=$as_save_IFS
41720   test -z "$as_dir" && as_dir=.
41721     for ac_exec_ext in '' $ac_executable_extensions; do
41722   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41723     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41724     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41725     break 2
41726   fi
41727 done
41728   done
41729 IFS=$as_save_IFS
41730 
41731 fi
41732 fi
41733 STRIP=$ac_cv_prog_STRIP
41734 if test -n "$STRIP"; then
41735   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41736 $as_echo "$STRIP" >&6; }
41737 else
41738   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41739 $as_echo "no" >&6; }
41740 fi
41741 
41742 
41743     test -n "$STRIP" && break
41744   done
41745 fi
41746 if test -z "$STRIP"; then
41747   ac_ct_STRIP=$STRIP
41748   for ac_prog in strip
41749 do
41750   # Extract the first word of "$ac_prog", so it can be a program name with args.
41751 set dummy $ac_prog; ac_word=$2
41752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41753 $as_echo_n "checking for $ac_word... " >&6; }
41754 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41755   $as_echo_n "(cached) " >&6
41756 else
41757   if test -n "$ac_ct_STRIP"; then
41758   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41759 else
41760 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41761 for as_dir in $PATH
41762 do
41763   IFS=$as_save_IFS
41764   test -z "$as_dir" && as_dir=.
41765     for ac_exec_ext in '' $ac_executable_extensions; do
41766   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41767     ac_cv_prog_ac_ct_STRIP="$ac_prog"
41768     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41769     break 2
41770   fi
41771 done
41772   done
41773 IFS=$as_save_IFS
41774 
41775 fi
41776 fi
41777 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41778 if test -n "$ac_ct_STRIP"; then
41779   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41780 $as_echo "$ac_ct_STRIP" >&6; }
41781 else
41782   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41783 $as_echo "no" >&6; }
41784 fi
41785 
41786 
41787   test -n "$ac_ct_STRIP" && break
41788 done
41789 
41790   if test "x$ac_ct_STRIP" = x; then
41791     STRIP=""
41792   else
41793     case $cross_compiling:$ac_tool_warned in
41794 yes:)
41795 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41796 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41797 ac_tool_warned=yes ;;
41798 esac
41799     STRIP=$ac_ct_STRIP
41800   fi
41801 fi
41802 
41803   else
41804     # The variable is set, but is it from the command line or the environment?
41805 
41806     # Try to remove the string !STRIP! from our list.
41807     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
41808     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41809       # If it failed, the variable was not from the command line. Ignore it,
41810       # but warn the user (except for BASH, which is always set by the calling BASH).
41811       if test "xSTRIP" != xBASH; then
41812         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
41813 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
41814       fi
41815       # Try to locate tool using the code snippet
41816       if test -n "$ac_tool_prefix"; then
41817   for ac_prog in strip
41818   do
41819     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41820 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41822 $as_echo_n "checking for $ac_word... " >&6; }
41823 if ${ac_cv_prog_STRIP+:} false; then :
41824   $as_echo_n "(cached) " >&6
41825 else
41826   if test -n "$STRIP"; then
41827   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41828 else
41829 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41830 for as_dir in $PATH
41831 do
41832   IFS=$as_save_IFS
41833   test -z "$as_dir" && as_dir=.
41834     for ac_exec_ext in '' $ac_executable_extensions; do
41835   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41836     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41837     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41838     break 2
41839   fi
41840 done
41841   done
41842 IFS=$as_save_IFS
41843 
41844 fi
41845 fi
41846 STRIP=$ac_cv_prog_STRIP
41847 if test -n "$STRIP"; then
41848   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41849 $as_echo "$STRIP" >&6; }
41850 else
41851   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41852 $as_echo "no" >&6; }
41853 fi
41854 
41855 
41856     test -n "$STRIP" && break
41857   done
41858 fi
41859 if test -z "$STRIP"; then
41860   ac_ct_STRIP=$STRIP
41861   for ac_prog in strip
41862 do
41863   # Extract the first word of "$ac_prog", so it can be a program name with args.
41864 set dummy $ac_prog; ac_word=$2
41865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41866 $as_echo_n "checking for $ac_word... " >&6; }
41867 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41868   $as_echo_n "(cached) " >&6
41869 else
41870   if test -n "$ac_ct_STRIP"; then
41871   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41872 else
41873 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41874 for as_dir in $PATH
41875 do
41876   IFS=$as_save_IFS
41877   test -z "$as_dir" && as_dir=.
41878     for ac_exec_ext in '' $ac_executable_extensions; do
41879   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41880     ac_cv_prog_ac_ct_STRIP="$ac_prog"
41881     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41882     break 2
41883   fi
41884 done
41885   done
41886 IFS=$as_save_IFS
41887 
41888 fi
41889 fi
41890 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41891 if test -n "$ac_ct_STRIP"; then
41892   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41893 $as_echo "$ac_ct_STRIP" >&6; }
41894 else
41895   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41896 $as_echo "no" >&6; }
41897 fi
41898 
41899 
41900   test -n "$ac_ct_STRIP" && break
41901 done
41902 
41903   if test "x$ac_ct_STRIP" = x; then
41904     STRIP=""
41905   else
41906     case $cross_compiling:$ac_tool_warned in
41907 yes:)
41908 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41909 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41910 ac_tool_warned=yes ;;
41911 esac
41912     STRIP=$ac_ct_STRIP
41913   fi
41914 fi
41915 
41916     else
41917       # If it succeeded, then it was overridden by the user. We will use it
41918       # for the tool.
41919 
41920       # First remove it from the list of overridden variables, so we can test
41921       # for unknown variables in the end.
41922       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41923 
41924       # Check if we try to supply an empty value
41925       if test "x$STRIP" = x; then
41926         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
41927 $as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
41928         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41929 $as_echo_n "checking for STRIP... " >&6; }
41930         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41931 $as_echo "disabled" >&6; }
41932       else
41933         # Check if the provided tool contains a complete path.
41934         tool_specified="$STRIP"
41935         tool_basename="${tool_specified##*/}"
41936         if test "x$tool_basename" = "x$tool_specified"; then
41937           # A command without a complete path is provided, search $PATH.
41938           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
41939 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
41940           # Extract the first word of "$tool_basename", so it can be a program name with args.
41941 set dummy $tool_basename; ac_word=$2
41942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41943 $as_echo_n "checking for $ac_word... " >&6; }
41944 if ${ac_cv_path_STRIP+:} false; then :
41945   $as_echo_n "(cached) " >&6
41946 else
41947   case $STRIP in
41948   [\\/]* | ?:[\\/]*)
41949   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
41950   ;;
41951   *)
41952   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41953 for as_dir in $PATH
41954 do
41955   IFS=$as_save_IFS
41956   test -z "$as_dir" && as_dir=.
41957     for ac_exec_ext in '' $ac_executable_extensions; do
41958   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41959     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
41960     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41961     break 2
41962   fi
41963 done
41964   done
41965 IFS=$as_save_IFS
41966 
41967   ;;
41968 esac
41969 fi
41970 STRIP=$ac_cv_path_STRIP
41971 if test -n "$STRIP"; then
41972   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41973 $as_echo "$STRIP" >&6; }
41974 else
41975   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41976 $as_echo "no" >&6; }
41977 fi
41978 
41979 
41980           if test "x$STRIP" = x; then
41981             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41982           fi
41983         else
41984           # Otherwise we believe it is a complete path. Use it as it is.
41985           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
41986 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
41987           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41988 $as_echo_n "checking for STRIP... " >&6; }
41989           if test ! -x "$tool_specified"; then
41990             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41991 $as_echo "not found" >&6; }
41992             as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
41993           fi
41994           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41995 $as_echo "$tool_specified" >&6; }
41996         fi
41997       fi
41998     fi
41999 
42000   fi
42001 
42002 
42003 
42004   # Only process if variable expands to non-empty
42005 
42006   if test "x$STRIP" != x; then
42007     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42008 
42009   # First separate the path from the arguments. This will split at the first
42010   # space.
42011   complete="$STRIP"
42012   path="${complete%% *}"
42013   tmp="$complete EOL"
42014   arguments="${tmp#* }"
42015 
42016   # Input might be given as Windows format, start by converting to
42017   # unix format.
42018   new_path=`$CYGPATH -u "$path"`
42019 
42020   # Now try to locate executable using which
42021   new_path=`$WHICH "$new_path" 2> /dev/null`
42022   # bat and cmd files are not always considered executable in cygwin causing which
42023   # to not find them
42024   if test "x$new_path" = x \
42025       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42026       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42027     new_path=`$CYGPATH -u "$path"`
42028   fi
42029   if test "x$new_path" = x; then
42030     # Oops. Which didn't find the executable.
42031     # The splitting of arguments from the executable at a space might have been incorrect,
42032     # since paths with space are more likely in Windows. Give it another try with the whole
42033     # argument.
42034     path="$complete"
42035     arguments="EOL"
42036     new_path=`$CYGPATH -u "$path"`
42037     new_path=`$WHICH "$new_path" 2> /dev/null`
42038     # bat and cmd files are not always considered executable in cygwin causing which
42039     # to not find them
42040     if test "x$new_path" = x \
42041         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42042         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42043       new_path=`$CYGPATH -u "$path"`
42044     fi
42045     if test "x$new_path" = x; then
42046       # It's still not found. Now this is an unrecoverable error.
42047       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42048 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42049       has_space=`$ECHO "$complete" | $GREP " "`
42050       if test "x$has_space" != x; then
42051         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42052 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42053       fi
42054       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42055     fi
42056   fi
42057 
42058   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42059   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42060   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42061   # "foo.exe" is OK but "foo" is an error.
42062   #
42063   # This test is therefore slightly more accurate than "test -f" to check for file presence.
42064   # It is also a way to make sure we got the proper file name for the real test later on.
42065   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42066   if test "x$test_shortpath" = x; then
42067     # Short path failed, file does not exist as specified.
42068     # Try adding .exe or .cmd
42069     if test -f "${new_path}.exe"; then
42070       input_to_shortpath="${new_path}.exe"
42071     elif test -f "${new_path}.cmd"; then
42072       input_to_shortpath="${new_path}.cmd"
42073     else
42074       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
42075 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
42076       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42077 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42078       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42079     fi
42080   else
42081     input_to_shortpath="$new_path"
42082   fi
42083 
42084   # Call helper function which possibly converts this using DOS-style short mode.
42085   # If so, the updated path is stored in $new_path.
42086   new_path="$input_to_shortpath"
42087 
42088   input_path="$input_to_shortpath"
42089   # Check if we need to convert this using DOS-style short mode. If the path
42090   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42091   # take no chances and rewrite it.
42092   # Note: m4 eats our [], so we need to use [ and ] instead.
42093   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42094   if test "x$has_forbidden_chars" != x; then
42095     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42096     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42097     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42098     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42099       # Going to short mode and back again did indeed matter. Since short mode is
42100       # case insensitive, let's make it lowercase to improve readability.
42101       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42102       # Now convert it back to Unix-style (cygpath)
42103       input_path=`$CYGPATH -u "$shortmode_path"`
42104       new_path="$input_path"
42105     fi
42106   fi
42107 
42108   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42109   if test "x$test_cygdrive_prefix" = x; then
42110     # As a simple fix, exclude /usr/bin since it's not a real path.
42111     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42112       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42113       # a path prefixed by /cygdrive for fixpath to work.
42114       new_path="$CYGWIN_ROOT_PATH$input_path"
42115     fi
42116   fi
42117 
42118   # remove trailing .exe if any
42119   new_path="${new_path/%.exe/}"
42120 
42121     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42122 
42123   # First separate the path from the arguments. This will split at the first
42124   # space.
42125   complete="$STRIP"
42126   path="${complete%% *}"
42127   tmp="$complete EOL"
42128   arguments="${tmp#* }"
42129 
42130   # Input might be given as Windows format, start by converting to
42131   # unix format.
42132   new_path="$path"
42133 
42134   windows_path="$new_path"
42135   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42136     unix_path=`$CYGPATH -u "$windows_path"`
42137     new_path="$unix_path"
42138   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42139     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42140     new_path="$unix_path"
42141   fi
42142 
42143 
42144   # Now try to locate executable using which
42145   new_path=`$WHICH "$new_path" 2> /dev/null`
42146 
42147   if test "x$new_path" = x; then
42148     # Oops. Which didn't find the executable.
42149     # The splitting of arguments from the executable at a space might have been incorrect,
42150     # since paths with space are more likely in Windows. Give it another try with the whole
42151     # argument.
42152     path="$complete"
42153     arguments="EOL"
42154     new_path="$path"
42155 
42156   windows_path="$new_path"
42157   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42158     unix_path=`$CYGPATH -u "$windows_path"`
42159     new_path="$unix_path"
42160   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42161     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42162     new_path="$unix_path"
42163   fi
42164 
42165 
42166     new_path=`$WHICH "$new_path" 2> /dev/null`
42167     # bat and cmd files are not always considered executable in MSYS causing which
42168     # to not find them
42169     if test "x$new_path" = x \
42170         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42171         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42172       new_path="$path"
42173 
42174   windows_path="$new_path"
42175   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42176     unix_path=`$CYGPATH -u "$windows_path"`
42177     new_path="$unix_path"
42178   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42179     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42180     new_path="$unix_path"
42181   fi
42182 
42183     fi
42184 
42185     if test "x$new_path" = x; then
42186       # It's still not found. Now this is an unrecoverable error.
42187       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42188 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42189       has_space=`$ECHO "$complete" | $GREP " "`
42190       if test "x$has_space" != x; then
42191         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42192 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42193       fi
42194       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42195     fi
42196   fi
42197 
42198   # Now new_path has a complete unix path to the binary
42199   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42200     # Keep paths in /bin as-is, but remove trailing .exe if any
42201     new_path="${new_path/%.exe/}"
42202     # Do not save /bin paths to all_fixpath_prefixes!
42203   else
42204     # Not in mixed or Windows style, start by that.
42205     new_path=`cmd //c echo $new_path`
42206 
42207   input_path="$new_path"
42208   # Check if we need to convert this using DOS-style short mode. If the path
42209   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42210   # take no chances and rewrite it.
42211   # Note: m4 eats our [], so we need to use [ and ] instead.
42212   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42213   if test "x$has_forbidden_chars" != x; then
42214     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42215     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42216   fi
42217 
42218     # Output is in $new_path
42219 
42220   windows_path="$new_path"
42221   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42222     unix_path=`$CYGPATH -u "$windows_path"`
42223     new_path="$unix_path"
42224   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42225     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42226     new_path="$unix_path"
42227   fi
42228 
42229     # remove trailing .exe if any
42230     new_path="${new_path/%.exe/}"
42231 
42232     # Save the first 10 bytes of this path to the storage, so fixpath can work.
42233     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42234   fi
42235 
42236     else
42237       # We're on a unix platform. Hooray! :)
42238       # First separate the path from the arguments. This will split at the first
42239       # space.
42240       complete="$STRIP"
42241       path="${complete%% *}"
42242       tmp="$complete EOL"
42243       arguments="${tmp#* }"
42244 
42245       # Cannot rely on the command "which" here since it doesn't always work.
42246       is_absolute_path=`$ECHO "$path" | $GREP ^/`
42247       if test -z "$is_absolute_path"; then
42248         # Path to executable is not absolute. Find it.
42249         IFS_save="$IFS"
42250         IFS=:
42251         for p in $PATH; do
42252           if test -f "$p/$path" && test -x "$p/$path"; then
42253             new_path="$p/$path"
42254             break
42255           fi
42256         done
42257         IFS="$IFS_save"
42258       else
42259         # This is an absolute path, we can use it without further modifications.
42260         new_path="$path"
42261       fi
42262 
42263       if test "x$new_path" = x; then
42264         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42265 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42266         has_space=`$ECHO "$complete" | $GREP " "`
42267         if test "x$has_space" != x; then
42268           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42269 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42270         fi
42271         as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42272       fi
42273     fi
42274 
42275     # Now join together the path and the arguments once again
42276     if test "x$arguments" != xEOL; then
42277       new_complete="$new_path ${arguments% *}"
42278     else
42279       new_complete="$new_path"
42280     fi
42281 
42282     if test "x$complete" != "x$new_complete"; then
42283       STRIP="$new_complete"
42284       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
42285 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
42286     fi
42287   fi
42288 
42289     if test "x$TOOLCHAIN_TYPE" = xgcc; then
42290 
42291 
42292   # Publish this variable in the help.
42293 
42294 
42295   if [ -z "${NM+x}" ]; then
42296     # The variable is not set by user, try to locate tool using the code snippet
42297     if test -n "$ac_tool_prefix"; then
42298   for ac_prog in nm gcc-nm
42299   do
42300     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42301 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42303 $as_echo_n "checking for $ac_word... " >&6; }
42304 if ${ac_cv_prog_NM+:} false; then :
42305   $as_echo_n "(cached) " >&6
42306 else
42307   if test -n "$NM"; then
42308   ac_cv_prog_NM="$NM" # Let the user override the test.
42309 else
42310 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42311 for as_dir in $PATH
42312 do
42313   IFS=$as_save_IFS
42314   test -z "$as_dir" && as_dir=.
42315     for ac_exec_ext in '' $ac_executable_extensions; do
42316   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42317     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42318     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42319     break 2
42320   fi
42321 done
42322   done
42323 IFS=$as_save_IFS
42324 
42325 fi
42326 fi
42327 NM=$ac_cv_prog_NM
42328 if test -n "$NM"; then
42329   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42330 $as_echo "$NM" >&6; }
42331 else
42332   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42333 $as_echo "no" >&6; }
42334 fi
42335 
42336 
42337     test -n "$NM" && break
42338   done
42339 fi
42340 if test -z "$NM"; then
42341   ac_ct_NM=$NM
42342   for ac_prog in nm gcc-nm
42343 do
42344   # Extract the first word of "$ac_prog", so it can be a program name with args.
42345 set dummy $ac_prog; ac_word=$2
42346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42347 $as_echo_n "checking for $ac_word... " >&6; }
42348 if ${ac_cv_prog_ac_ct_NM+:} false; then :
42349   $as_echo_n "(cached) " >&6
42350 else
42351   if test -n "$ac_ct_NM"; then
42352   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42353 else
42354 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42355 for as_dir in $PATH
42356 do
42357   IFS=$as_save_IFS
42358   test -z "$as_dir" && as_dir=.
42359     for ac_exec_ext in '' $ac_executable_extensions; do
42360   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42361     ac_cv_prog_ac_ct_NM="$ac_prog"
42362     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42363     break 2
42364   fi
42365 done
42366   done
42367 IFS=$as_save_IFS
42368 
42369 fi
42370 fi
42371 ac_ct_NM=$ac_cv_prog_ac_ct_NM
42372 if test -n "$ac_ct_NM"; then
42373   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42374 $as_echo "$ac_ct_NM" >&6; }
42375 else
42376   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42377 $as_echo "no" >&6; }
42378 fi
42379 
42380 
42381   test -n "$ac_ct_NM" && break
42382 done
42383 
42384   if test "x$ac_ct_NM" = x; then
42385     NM=""
42386   else
42387     case $cross_compiling:$ac_tool_warned in
42388 yes:)
42389 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42390 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42391 ac_tool_warned=yes ;;
42392 esac
42393     NM=$ac_ct_NM
42394   fi
42395 fi
42396 
42397   else
42398     # The variable is set, but is it from the command line or the environment?
42399 
42400     # Try to remove the string !NM! from our list.
42401     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42402     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42403       # If it failed, the variable was not from the command line. Ignore it,
42404       # but warn the user (except for BASH, which is always set by the calling BASH).
42405       if test "xNM" != xBASH; then
42406         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42407 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42408       fi
42409       # Try to locate tool using the code snippet
42410       if test -n "$ac_tool_prefix"; then
42411   for ac_prog in nm gcc-nm
42412   do
42413     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42414 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42416 $as_echo_n "checking for $ac_word... " >&6; }
42417 if ${ac_cv_prog_NM+:} false; then :
42418   $as_echo_n "(cached) " >&6
42419 else
42420   if test -n "$NM"; then
42421   ac_cv_prog_NM="$NM" # Let the user override the test.
42422 else
42423 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42424 for as_dir in $PATH
42425 do
42426   IFS=$as_save_IFS
42427   test -z "$as_dir" && as_dir=.
42428     for ac_exec_ext in '' $ac_executable_extensions; do
42429   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42430     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42431     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42432     break 2
42433   fi
42434 done
42435   done
42436 IFS=$as_save_IFS
42437 
42438 fi
42439 fi
42440 NM=$ac_cv_prog_NM
42441 if test -n "$NM"; then
42442   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42443 $as_echo "$NM" >&6; }
42444 else
42445   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42446 $as_echo "no" >&6; }
42447 fi
42448 
42449 
42450     test -n "$NM" && break
42451   done
42452 fi
42453 if test -z "$NM"; then
42454   ac_ct_NM=$NM
42455   for ac_prog in nm gcc-nm
42456 do
42457   # Extract the first word of "$ac_prog", so it can be a program name with args.
42458 set dummy $ac_prog; ac_word=$2
42459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42460 $as_echo_n "checking for $ac_word... " >&6; }
42461 if ${ac_cv_prog_ac_ct_NM+:} false; then :
42462   $as_echo_n "(cached) " >&6
42463 else
42464   if test -n "$ac_ct_NM"; then
42465   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42466 else
42467 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42468 for as_dir in $PATH
42469 do
42470   IFS=$as_save_IFS
42471   test -z "$as_dir" && as_dir=.
42472     for ac_exec_ext in '' $ac_executable_extensions; do
42473   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42474     ac_cv_prog_ac_ct_NM="$ac_prog"
42475     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42476     break 2
42477   fi
42478 done
42479   done
42480 IFS=$as_save_IFS
42481 
42482 fi
42483 fi
42484 ac_ct_NM=$ac_cv_prog_ac_ct_NM
42485 if test -n "$ac_ct_NM"; then
42486   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42487 $as_echo "$ac_ct_NM" >&6; }
42488 else
42489   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42490 $as_echo "no" >&6; }
42491 fi
42492 
42493 
42494   test -n "$ac_ct_NM" && break
42495 done
42496 
42497   if test "x$ac_ct_NM" = x; then
42498     NM=""
42499   else
42500     case $cross_compiling:$ac_tool_warned in
42501 yes:)
42502 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42503 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42504 ac_tool_warned=yes ;;
42505 esac
42506     NM=$ac_ct_NM
42507   fi
42508 fi
42509 
42510     else
42511       # If it succeeded, then it was overridden by the user. We will use it
42512       # for the tool.
42513 
42514       # First remove it from the list of overridden variables, so we can test
42515       # for unknown variables in the end.
42516       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42517 
42518       # Check if we try to supply an empty value
42519       if test "x$NM" = x; then
42520         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42521 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42522         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42523 $as_echo_n "checking for NM... " >&6; }
42524         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42525 $as_echo "disabled" >&6; }
42526       else
42527         # Check if the provided tool contains a complete path.
42528         tool_specified="$NM"
42529         tool_basename="${tool_specified##*/}"
42530         if test "x$tool_basename" = "x$tool_specified"; then
42531           # A command without a complete path is provided, search $PATH.
42532           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42533 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42534           # Extract the first word of "$tool_basename", so it can be a program name with args.
42535 set dummy $tool_basename; ac_word=$2
42536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42537 $as_echo_n "checking for $ac_word... " >&6; }
42538 if ${ac_cv_path_NM+:} false; then :
42539   $as_echo_n "(cached) " >&6
42540 else
42541   case $NM in
42542   [\\/]* | ?:[\\/]*)
42543   ac_cv_path_NM="$NM" # Let the user override the test with a path.
42544   ;;
42545   *)
42546   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42547 for as_dir in $PATH
42548 do
42549   IFS=$as_save_IFS
42550   test -z "$as_dir" && as_dir=.
42551     for ac_exec_ext in '' $ac_executable_extensions; do
42552   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42553     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42554     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42555     break 2
42556   fi
42557 done
42558   done
42559 IFS=$as_save_IFS
42560 
42561   ;;
42562 esac
42563 fi
42564 NM=$ac_cv_path_NM
42565 if test -n "$NM"; then
42566   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42567 $as_echo "$NM" >&6; }
42568 else
42569   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42570 $as_echo "no" >&6; }
42571 fi
42572 
42573 
42574           if test "x$NM" = x; then
42575             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42576           fi
42577         else
42578           # Otherwise we believe it is a complete path. Use it as it is.
42579           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42580 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42581           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42582 $as_echo_n "checking for NM... " >&6; }
42583           if test ! -x "$tool_specified"; then
42584             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42585 $as_echo "not found" >&6; }
42586             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42587           fi
42588           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42589 $as_echo "$tool_specified" >&6; }
42590         fi
42591       fi
42592     fi
42593 
42594   fi
42595 
42596 
42597     else
42598 
42599 
42600   # Publish this variable in the help.
42601 
42602 
42603   if [ -z "${NM+x}" ]; then
42604     # The variable is not set by user, try to locate tool using the code snippet
42605     if test -n "$ac_tool_prefix"; then
42606   for ac_prog in nm
42607   do
42608     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42609 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42611 $as_echo_n "checking for $ac_word... " >&6; }
42612 if ${ac_cv_prog_NM+:} false; then :
42613   $as_echo_n "(cached) " >&6
42614 else
42615   if test -n "$NM"; then
42616   ac_cv_prog_NM="$NM" # Let the user override the test.
42617 else
42618 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42619 for as_dir in $PATH
42620 do
42621   IFS=$as_save_IFS
42622   test -z "$as_dir" && as_dir=.
42623     for ac_exec_ext in '' $ac_executable_extensions; do
42624   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42625     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42626     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42627     break 2
42628   fi
42629 done
42630   done
42631 IFS=$as_save_IFS
42632 
42633 fi
42634 fi
42635 NM=$ac_cv_prog_NM
42636 if test -n "$NM"; then
42637   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42638 $as_echo "$NM" >&6; }
42639 else
42640   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42641 $as_echo "no" >&6; }
42642 fi
42643 
42644 
42645     test -n "$NM" && break
42646   done
42647 fi
42648 if test -z "$NM"; then
42649   ac_ct_NM=$NM
42650   for ac_prog in nm
42651 do
42652   # Extract the first word of "$ac_prog", so it can be a program name with args.
42653 set dummy $ac_prog; ac_word=$2
42654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42655 $as_echo_n "checking for $ac_word... " >&6; }
42656 if ${ac_cv_prog_ac_ct_NM+:} false; then :
42657   $as_echo_n "(cached) " >&6
42658 else
42659   if test -n "$ac_ct_NM"; then
42660   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42661 else
42662 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42663 for as_dir in $PATH
42664 do
42665   IFS=$as_save_IFS
42666   test -z "$as_dir" && as_dir=.
42667     for ac_exec_ext in '' $ac_executable_extensions; do
42668   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42669     ac_cv_prog_ac_ct_NM="$ac_prog"
42670     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42671     break 2
42672   fi
42673 done
42674   done
42675 IFS=$as_save_IFS
42676 
42677 fi
42678 fi
42679 ac_ct_NM=$ac_cv_prog_ac_ct_NM
42680 if test -n "$ac_ct_NM"; then
42681   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42682 $as_echo "$ac_ct_NM" >&6; }
42683 else
42684   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42685 $as_echo "no" >&6; }
42686 fi
42687 
42688 
42689   test -n "$ac_ct_NM" && break
42690 done
42691 
42692   if test "x$ac_ct_NM" = x; then
42693     NM=""
42694   else
42695     case $cross_compiling:$ac_tool_warned in
42696 yes:)
42697 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42698 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42699 ac_tool_warned=yes ;;
42700 esac
42701     NM=$ac_ct_NM
42702   fi
42703 fi
42704 
42705   else
42706     # The variable is set, but is it from the command line or the environment?
42707 
42708     # Try to remove the string !NM! from our list.
42709     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42710     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42711       # If it failed, the variable was not from the command line. Ignore it,
42712       # but warn the user (except for BASH, which is always set by the calling BASH).
42713       if test "xNM" != xBASH; then
42714         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42715 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42716       fi
42717       # Try to locate tool using the code snippet
42718       if test -n "$ac_tool_prefix"; then
42719   for ac_prog in nm
42720   do
42721     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42722 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42724 $as_echo_n "checking for $ac_word... " >&6; }
42725 if ${ac_cv_prog_NM+:} false; then :
42726   $as_echo_n "(cached) " >&6
42727 else
42728   if test -n "$NM"; then
42729   ac_cv_prog_NM="$NM" # Let the user override the test.
42730 else
42731 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42732 for as_dir in $PATH
42733 do
42734   IFS=$as_save_IFS
42735   test -z "$as_dir" && as_dir=.
42736     for ac_exec_ext in '' $ac_executable_extensions; do
42737   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42738     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42739     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42740     break 2
42741   fi
42742 done
42743   done
42744 IFS=$as_save_IFS
42745 
42746 fi
42747 fi
42748 NM=$ac_cv_prog_NM
42749 if test -n "$NM"; then
42750   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42751 $as_echo "$NM" >&6; }
42752 else
42753   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42754 $as_echo "no" >&6; }
42755 fi
42756 
42757 
42758     test -n "$NM" && break
42759   done
42760 fi
42761 if test -z "$NM"; then
42762   ac_ct_NM=$NM
42763   for ac_prog in nm
42764 do
42765   # Extract the first word of "$ac_prog", so it can be a program name with args.
42766 set dummy $ac_prog; ac_word=$2
42767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42768 $as_echo_n "checking for $ac_word... " >&6; }
42769 if ${ac_cv_prog_ac_ct_NM+:} false; then :
42770   $as_echo_n "(cached) " >&6
42771 else
42772   if test -n "$ac_ct_NM"; then
42773   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42774 else
42775 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42776 for as_dir in $PATH
42777 do
42778   IFS=$as_save_IFS
42779   test -z "$as_dir" && as_dir=.
42780     for ac_exec_ext in '' $ac_executable_extensions; do
42781   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42782     ac_cv_prog_ac_ct_NM="$ac_prog"
42783     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42784     break 2
42785   fi
42786 done
42787   done
42788 IFS=$as_save_IFS
42789 
42790 fi
42791 fi
42792 ac_ct_NM=$ac_cv_prog_ac_ct_NM
42793 if test -n "$ac_ct_NM"; then
42794   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42795 $as_echo "$ac_ct_NM" >&6; }
42796 else
42797   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42798 $as_echo "no" >&6; }
42799 fi
42800 
42801 
42802   test -n "$ac_ct_NM" && break
42803 done
42804 
42805   if test "x$ac_ct_NM" = x; then
42806     NM=""
42807   else
42808     case $cross_compiling:$ac_tool_warned in
42809 yes:)
42810 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42811 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42812 ac_tool_warned=yes ;;
42813 esac
42814     NM=$ac_ct_NM
42815   fi
42816 fi
42817 
42818     else
42819       # If it succeeded, then it was overridden by the user. We will use it
42820       # for the tool.
42821 
42822       # First remove it from the list of overridden variables, so we can test
42823       # for unknown variables in the end.
42824       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42825 
42826       # Check if we try to supply an empty value
42827       if test "x$NM" = x; then
42828         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42829 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42830         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42831 $as_echo_n "checking for NM... " >&6; }
42832         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42833 $as_echo "disabled" >&6; }
42834       else
42835         # Check if the provided tool contains a complete path.
42836         tool_specified="$NM"
42837         tool_basename="${tool_specified##*/}"
42838         if test "x$tool_basename" = "x$tool_specified"; then
42839           # A command without a complete path is provided, search $PATH.
42840           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42841 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42842           # Extract the first word of "$tool_basename", so it can be a program name with args.
42843 set dummy $tool_basename; ac_word=$2
42844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42845 $as_echo_n "checking for $ac_word... " >&6; }
42846 if ${ac_cv_path_NM+:} false; then :
42847   $as_echo_n "(cached) " >&6
42848 else
42849   case $NM in
42850   [\\/]* | ?:[\\/]*)
42851   ac_cv_path_NM="$NM" # Let the user override the test with a path.
42852   ;;
42853   *)
42854   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42855 for as_dir in $PATH
42856 do
42857   IFS=$as_save_IFS
42858   test -z "$as_dir" && as_dir=.
42859     for ac_exec_ext in '' $ac_executable_extensions; do
42860   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42861     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42862     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42863     break 2
42864   fi
42865 done
42866   done
42867 IFS=$as_save_IFS
42868 
42869   ;;
42870 esac
42871 fi
42872 NM=$ac_cv_path_NM
42873 if test -n "$NM"; then
42874   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42875 $as_echo "$NM" >&6; }
42876 else
42877   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42878 $as_echo "no" >&6; }
42879 fi
42880 
42881 
42882           if test "x$NM" = x; then
42883             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42884           fi
42885         else
42886           # Otherwise we believe it is a complete path. Use it as it is.
42887           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42888 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42889           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42890 $as_echo_n "checking for NM... " >&6; }
42891           if test ! -x "$tool_specified"; then
42892             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42893 $as_echo "not found" >&6; }
42894             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42895           fi
42896           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42897 $as_echo "$tool_specified" >&6; }
42898         fi
42899       fi
42900     fi
42901 
42902   fi
42903 
42904 
42905     fi
42906 
42907   # Only process if variable expands to non-empty
42908 
42909   if test "x$NM" != x; then
42910     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42911 
42912   # First separate the path from the arguments. This will split at the first
42913   # space.
42914   complete="$NM"
42915   path="${complete%% *}"
42916   tmp="$complete EOL"
42917   arguments="${tmp#* }"
42918 
42919   # Input might be given as Windows format, start by converting to
42920   # unix format.
42921   new_path=`$CYGPATH -u "$path"`
42922 
42923   # Now try to locate executable using which
42924   new_path=`$WHICH "$new_path" 2> /dev/null`
42925   # bat and cmd files are not always considered executable in cygwin causing which
42926   # to not find them
42927   if test "x$new_path" = x \
42928       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42929       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42930     new_path=`$CYGPATH -u "$path"`
42931   fi
42932   if test "x$new_path" = x; then
42933     # Oops. Which didn't find the executable.
42934     # The splitting of arguments from the executable at a space might have been incorrect,
42935     # since paths with space are more likely in Windows. Give it another try with the whole
42936     # argument.
42937     path="$complete"
42938     arguments="EOL"
42939     new_path=`$CYGPATH -u "$path"`
42940     new_path=`$WHICH "$new_path" 2> /dev/null`
42941     # bat and cmd files are not always considered executable in cygwin causing which
42942     # to not find them
42943     if test "x$new_path" = x \
42944         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42945         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42946       new_path=`$CYGPATH -u "$path"`
42947     fi
42948     if test "x$new_path" = x; then
42949       # It's still not found. Now this is an unrecoverable error.
42950       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42951 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42952       has_space=`$ECHO "$complete" | $GREP " "`
42953       if test "x$has_space" != x; then
42954         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42955 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42956       fi
42957       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42958     fi
42959   fi
42960 
42961   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42962   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42963   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42964   # "foo.exe" is OK but "foo" is an error.
42965   #
42966   # This test is therefore slightly more accurate than "test -f" to check for file presence.
42967   # It is also a way to make sure we got the proper file name for the real test later on.
42968   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42969   if test "x$test_shortpath" = x; then
42970     # Short path failed, file does not exist as specified.
42971     # Try adding .exe or .cmd
42972     if test -f "${new_path}.exe"; then
42973       input_to_shortpath="${new_path}.exe"
42974     elif test -f "${new_path}.cmd"; then
42975       input_to_shortpath="${new_path}.cmd"
42976     else
42977       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
42978 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
42979       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42980 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42981       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42982     fi
42983   else
42984     input_to_shortpath="$new_path"
42985   fi
42986 
42987   # Call helper function which possibly converts this using DOS-style short mode.
42988   # If so, the updated path is stored in $new_path.
42989   new_path="$input_to_shortpath"
42990 
42991   input_path="$input_to_shortpath"
42992   # Check if we need to convert this using DOS-style short mode. If the path
42993   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42994   # take no chances and rewrite it.
42995   # Note: m4 eats our [], so we need to use [ and ] instead.
42996   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42997   if test "x$has_forbidden_chars" != x; then
42998     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42999     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43000     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43001     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43002       # Going to short mode and back again did indeed matter. Since short mode is
43003       # case insensitive, let's make it lowercase to improve readability.
43004       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43005       # Now convert it back to Unix-style (cygpath)
43006       input_path=`$CYGPATH -u "$shortmode_path"`
43007       new_path="$input_path"
43008     fi
43009   fi
43010 
43011   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43012   if test "x$test_cygdrive_prefix" = x; then
43013     # As a simple fix, exclude /usr/bin since it's not a real path.
43014     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43015       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43016       # a path prefixed by /cygdrive for fixpath to work.
43017       new_path="$CYGWIN_ROOT_PATH$input_path"
43018     fi
43019   fi
43020 
43021   # remove trailing .exe if any
43022   new_path="${new_path/%.exe/}"
43023 
43024     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43025 
43026   # First separate the path from the arguments. This will split at the first
43027   # space.
43028   complete="$NM"
43029   path="${complete%% *}"
43030   tmp="$complete EOL"
43031   arguments="${tmp#* }"
43032 
43033   # Input might be given as Windows format, start by converting to
43034   # unix format.
43035   new_path="$path"
43036 
43037   windows_path="$new_path"
43038   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43039     unix_path=`$CYGPATH -u "$windows_path"`
43040     new_path="$unix_path"
43041   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43042     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43043     new_path="$unix_path"
43044   fi
43045 
43046 
43047   # Now try to locate executable using which
43048   new_path=`$WHICH "$new_path" 2> /dev/null`
43049 
43050   if test "x$new_path" = x; then
43051     # Oops. Which didn't find the executable.
43052     # The splitting of arguments from the executable at a space might have been incorrect,
43053     # since paths with space are more likely in Windows. Give it another try with the whole
43054     # argument.
43055     path="$complete"
43056     arguments="EOL"
43057     new_path="$path"
43058 
43059   windows_path="$new_path"
43060   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43061     unix_path=`$CYGPATH -u "$windows_path"`
43062     new_path="$unix_path"
43063   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43064     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43065     new_path="$unix_path"
43066   fi
43067 
43068 
43069     new_path=`$WHICH "$new_path" 2> /dev/null`
43070     # bat and cmd files are not always considered executable in MSYS causing which
43071     # to not find them
43072     if test "x$new_path" = x \
43073         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43074         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43075       new_path="$path"
43076 
43077   windows_path="$new_path"
43078   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43079     unix_path=`$CYGPATH -u "$windows_path"`
43080     new_path="$unix_path"
43081   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43082     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43083     new_path="$unix_path"
43084   fi
43085 
43086     fi
43087 
43088     if test "x$new_path" = x; then
43089       # It's still not found. Now this is an unrecoverable error.
43090       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43091 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43092       has_space=`$ECHO "$complete" | $GREP " "`
43093       if test "x$has_space" != x; then
43094         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43095 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43096       fi
43097       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43098     fi
43099   fi
43100 
43101   # Now new_path has a complete unix path to the binary
43102   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43103     # Keep paths in /bin as-is, but remove trailing .exe if any
43104     new_path="${new_path/%.exe/}"
43105     # Do not save /bin paths to all_fixpath_prefixes!
43106   else
43107     # Not in mixed or Windows style, start by that.
43108     new_path=`cmd //c echo $new_path`
43109 
43110   input_path="$new_path"
43111   # Check if we need to convert this using DOS-style short mode. If the path
43112   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43113   # take no chances and rewrite it.
43114   # Note: m4 eats our [], so we need to use [ and ] instead.
43115   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43116   if test "x$has_forbidden_chars" != x; then
43117     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43118     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43119   fi
43120 
43121     # Output is in $new_path
43122 
43123   windows_path="$new_path"
43124   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43125     unix_path=`$CYGPATH -u "$windows_path"`
43126     new_path="$unix_path"
43127   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43128     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43129     new_path="$unix_path"
43130   fi
43131 
43132     # remove trailing .exe if any
43133     new_path="${new_path/%.exe/}"
43134 
43135     # Save the first 10 bytes of this path to the storage, so fixpath can work.
43136     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43137   fi
43138 
43139     else
43140       # We're on a unix platform. Hooray! :)
43141       # First separate the path from the arguments. This will split at the first
43142       # space.
43143       complete="$NM"
43144       path="${complete%% *}"
43145       tmp="$complete EOL"
43146       arguments="${tmp#* }"
43147 
43148       # Cannot rely on the command "which" here since it doesn't always work.
43149       is_absolute_path=`$ECHO "$path" | $GREP ^/`
43150       if test -z "$is_absolute_path"; then
43151         # Path to executable is not absolute. Find it.
43152         IFS_save="$IFS"
43153         IFS=:
43154         for p in $PATH; do
43155           if test -f "$p/$path" && test -x "$p/$path"; then
43156             new_path="$p/$path"
43157             break
43158           fi
43159         done
43160         IFS="$IFS_save"
43161       else
43162         # This is an absolute path, we can use it without further modifications.
43163         new_path="$path"
43164       fi
43165 
43166       if test "x$new_path" = x; then
43167         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43168 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43169         has_space=`$ECHO "$complete" | $GREP " "`
43170         if test "x$has_space" != x; then
43171           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43172 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43173         fi
43174         as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43175       fi
43176     fi
43177 
43178     # Now join together the path and the arguments once again
43179     if test "x$arguments" != xEOL; then
43180       new_complete="$new_path ${arguments% *}"
43181     else
43182       new_complete="$new_path"
43183     fi
43184 
43185     if test "x$complete" != "x$new_complete"; then
43186       NM="$new_complete"
43187       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
43188 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
43189     fi
43190   fi
43191 
43192     GNM="$NM"
43193 
43194   fi
43195 
43196   # objcopy is used for moving debug symbols to separate files when
43197   # full debug symbols are enabled.
43198   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
43199 
43200 
43201   # Publish this variable in the help.
43202 
43203 
43204   if [ -z "${OBJCOPY+x}" ]; then
43205     # The variable is not set by user, try to locate tool using the code snippet
43206     if test -n "$ac_tool_prefix"; then
43207   for ac_prog in gobjcopy objcopy
43208   do
43209     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43210 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43212 $as_echo_n "checking for $ac_word... " >&6; }
43213 if ${ac_cv_prog_OBJCOPY+:} false; then :
43214   $as_echo_n "(cached) " >&6
43215 else
43216   if test -n "$OBJCOPY"; then
43217   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
43218 else
43219 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43220 for as_dir in $PATH
43221 do
43222   IFS=$as_save_IFS
43223   test -z "$as_dir" && as_dir=.
43224     for ac_exec_ext in '' $ac_executable_extensions; do
43225   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43226     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
43227     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43228     break 2
43229   fi
43230 done
43231   done
43232 IFS=$as_save_IFS
43233 
43234 fi
43235 fi
43236 OBJCOPY=$ac_cv_prog_OBJCOPY
43237 if test -n "$OBJCOPY"; then
43238   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43239 $as_echo "$OBJCOPY" >&6; }
43240 else
43241   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43242 $as_echo "no" >&6; }
43243 fi
43244 
43245 
43246     test -n "$OBJCOPY" && break
43247   done
43248 fi
43249 if test -z "$OBJCOPY"; then
43250   ac_ct_OBJCOPY=$OBJCOPY
43251   for ac_prog in gobjcopy objcopy
43252 do
43253   # Extract the first word of "$ac_prog", so it can be a program name with args.
43254 set dummy $ac_prog; ac_word=$2
43255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43256 $as_echo_n "checking for $ac_word... " >&6; }
43257 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
43258   $as_echo_n "(cached) " >&6
43259 else
43260   if test -n "$ac_ct_OBJCOPY"; then
43261   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
43262 else
43263 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43264 for as_dir in $PATH
43265 do
43266   IFS=$as_save_IFS
43267   test -z "$as_dir" && as_dir=.
43268     for ac_exec_ext in '' $ac_executable_extensions; do
43269   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43270     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
43271     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43272     break 2
43273   fi
43274 done
43275   done
43276 IFS=$as_save_IFS
43277 
43278 fi
43279 fi
43280 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
43281 if test -n "$ac_ct_OBJCOPY"; then
43282   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
43283 $as_echo "$ac_ct_OBJCOPY" >&6; }
43284 else
43285   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43286 $as_echo "no" >&6; }
43287 fi
43288 
43289 
43290   test -n "$ac_ct_OBJCOPY" && break
43291 done
43292 
43293   if test "x$ac_ct_OBJCOPY" = x; then
43294     OBJCOPY=""
43295   else
43296     case $cross_compiling:$ac_tool_warned in
43297 yes:)
43298 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43299 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43300 ac_tool_warned=yes ;;
43301 esac
43302     OBJCOPY=$ac_ct_OBJCOPY
43303   fi
43304 fi
43305 
43306   else
43307     # The variable is set, but is it from the command line or the environment?
43308 
43309     # Try to remove the string !OBJCOPY! from our list.
43310     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
43311     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43312       # If it failed, the variable was not from the command line. Ignore it,
43313       # but warn the user (except for BASH, which is always set by the calling BASH).
43314       if test "xOBJCOPY" != xBASH; then
43315         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
43316 $as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
43317       fi
43318       # Try to locate tool using the code snippet
43319       if test -n "$ac_tool_prefix"; then
43320   for ac_prog in gobjcopy objcopy
43321   do
43322     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43323 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43325 $as_echo_n "checking for $ac_word... " >&6; }
43326 if ${ac_cv_prog_OBJCOPY+:} false; then :
43327   $as_echo_n "(cached) " >&6
43328 else
43329   if test -n "$OBJCOPY"; then
43330   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
43331 else
43332 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43333 for as_dir in $PATH
43334 do
43335   IFS=$as_save_IFS
43336   test -z "$as_dir" && as_dir=.
43337     for ac_exec_ext in '' $ac_executable_extensions; do
43338   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43339     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
43340     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43341     break 2
43342   fi
43343 done
43344   done
43345 IFS=$as_save_IFS
43346 
43347 fi
43348 fi
43349 OBJCOPY=$ac_cv_prog_OBJCOPY
43350 if test -n "$OBJCOPY"; then
43351   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43352 $as_echo "$OBJCOPY" >&6; }
43353 else
43354   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43355 $as_echo "no" >&6; }
43356 fi
43357 
43358 
43359     test -n "$OBJCOPY" && break
43360   done
43361 fi
43362 if test -z "$OBJCOPY"; then
43363   ac_ct_OBJCOPY=$OBJCOPY
43364   for ac_prog in gobjcopy objcopy
43365 do
43366   # Extract the first word of "$ac_prog", so it can be a program name with args.
43367 set dummy $ac_prog; ac_word=$2
43368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43369 $as_echo_n "checking for $ac_word... " >&6; }
43370 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
43371   $as_echo_n "(cached) " >&6
43372 else
43373   if test -n "$ac_ct_OBJCOPY"; then
43374   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
43375 else
43376 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43377 for as_dir in $PATH
43378 do
43379   IFS=$as_save_IFS
43380   test -z "$as_dir" && as_dir=.
43381     for ac_exec_ext in '' $ac_executable_extensions; do
43382   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43383     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
43384     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43385     break 2
43386   fi
43387 done
43388   done
43389 IFS=$as_save_IFS
43390 
43391 fi
43392 fi
43393 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
43394 if test -n "$ac_ct_OBJCOPY"; then
43395   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
43396 $as_echo "$ac_ct_OBJCOPY" >&6; }
43397 else
43398   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43399 $as_echo "no" >&6; }
43400 fi
43401 
43402 
43403   test -n "$ac_ct_OBJCOPY" && break
43404 done
43405 
43406   if test "x$ac_ct_OBJCOPY" = x; then
43407     OBJCOPY=""
43408   else
43409     case $cross_compiling:$ac_tool_warned in
43410 yes:)
43411 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43412 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43413 ac_tool_warned=yes ;;
43414 esac
43415     OBJCOPY=$ac_ct_OBJCOPY
43416   fi
43417 fi
43418 
43419     else
43420       # If it succeeded, then it was overridden by the user. We will use it
43421       # for the tool.
43422 
43423       # First remove it from the list of overridden variables, so we can test
43424       # for unknown variables in the end.
43425       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43426 
43427       # Check if we try to supply an empty value
43428       if test "x$OBJCOPY" = x; then
43429         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
43430 $as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
43431         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
43432 $as_echo_n "checking for OBJCOPY... " >&6; }
43433         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43434 $as_echo "disabled" >&6; }
43435       else
43436         # Check if the provided tool contains a complete path.
43437         tool_specified="$OBJCOPY"
43438         tool_basename="${tool_specified##*/}"
43439         if test "x$tool_basename" = "x$tool_specified"; then
43440           # A command without a complete path is provided, search $PATH.
43441           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
43442 $as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
43443           # Extract the first word of "$tool_basename", so it can be a program name with args.
43444 set dummy $tool_basename; ac_word=$2
43445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43446 $as_echo_n "checking for $ac_word... " >&6; }
43447 if ${ac_cv_path_OBJCOPY+:} false; then :
43448   $as_echo_n "(cached) " >&6
43449 else
43450   case $OBJCOPY in
43451   [\\/]* | ?:[\\/]*)
43452   ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
43453   ;;
43454   *)
43455   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43456 for as_dir in $PATH
43457 do
43458   IFS=$as_save_IFS
43459   test -z "$as_dir" && as_dir=.
43460     for ac_exec_ext in '' $ac_executable_extensions; do
43461   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43462     ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
43463     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43464     break 2
43465   fi
43466 done
43467   done
43468 IFS=$as_save_IFS
43469 
43470   ;;
43471 esac
43472 fi
43473 OBJCOPY=$ac_cv_path_OBJCOPY
43474 if test -n "$OBJCOPY"; then
43475   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43476 $as_echo "$OBJCOPY" >&6; }
43477 else
43478   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43479 $as_echo "no" >&6; }
43480 fi
43481 
43482 
43483           if test "x$OBJCOPY" = x; then
43484             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43485           fi
43486         else
43487           # Otherwise we believe it is a complete path. Use it as it is.
43488           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
43489 $as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
43490           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
43491 $as_echo_n "checking for OBJCOPY... " >&6; }
43492           if test ! -x "$tool_specified"; then
43493             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43494 $as_echo "not found" >&6; }
43495             as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
43496           fi
43497           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43498 $as_echo "$tool_specified" >&6; }
43499         fi
43500       fi
43501     fi
43502 
43503   fi
43504 
43505 
43506     # Only call fixup if objcopy was found.
43507     if test -n "$OBJCOPY"; then
43508 
43509   # Only process if variable expands to non-empty
43510 
43511   if test "x$OBJCOPY" != x; then
43512     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43513 
43514   # First separate the path from the arguments. This will split at the first
43515   # space.
43516   complete="$OBJCOPY"
43517   path="${complete%% *}"
43518   tmp="$complete EOL"
43519   arguments="${tmp#* }"
43520 
43521   # Input might be given as Windows format, start by converting to
43522   # unix format.
43523   new_path=`$CYGPATH -u "$path"`
43524 
43525   # Now try to locate executable using which
43526   new_path=`$WHICH "$new_path" 2> /dev/null`
43527   # bat and cmd files are not always considered executable in cygwin causing which
43528   # to not find them
43529   if test "x$new_path" = x \
43530       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43531       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43532     new_path=`$CYGPATH -u "$path"`
43533   fi
43534   if test "x$new_path" = x; then
43535     # Oops. Which didn't find the executable.
43536     # The splitting of arguments from the executable at a space might have been incorrect,
43537     # since paths with space are more likely in Windows. Give it another try with the whole
43538     # argument.
43539     path="$complete"
43540     arguments="EOL"
43541     new_path=`$CYGPATH -u "$path"`
43542     new_path=`$WHICH "$new_path" 2> /dev/null`
43543     # bat and cmd files are not always considered executable in cygwin causing which
43544     # to not find them
43545     if test "x$new_path" = x \
43546         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43547         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43548       new_path=`$CYGPATH -u "$path"`
43549     fi
43550     if test "x$new_path" = x; then
43551       # It's still not found. Now this is an unrecoverable error.
43552       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43553 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43554       has_space=`$ECHO "$complete" | $GREP " "`
43555       if test "x$has_space" != x; then
43556         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43557 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43558       fi
43559       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43560     fi
43561   fi
43562 
43563   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43564   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43565   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43566   # "foo.exe" is OK but "foo" is an error.
43567   #
43568   # This test is therefore slightly more accurate than "test -f" to check for file presence.
43569   # It is also a way to make sure we got the proper file name for the real test later on.
43570   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43571   if test "x$test_shortpath" = x; then
43572     # Short path failed, file does not exist as specified.
43573     # Try adding .exe or .cmd
43574     if test -f "${new_path}.exe"; then
43575       input_to_shortpath="${new_path}.exe"
43576     elif test -f "${new_path}.cmd"; then
43577       input_to_shortpath="${new_path}.cmd"
43578     else
43579       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
43580 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
43581       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43582 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43583       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43584     fi
43585   else
43586     input_to_shortpath="$new_path"
43587   fi
43588 
43589   # Call helper function which possibly converts this using DOS-style short mode.
43590   # If so, the updated path is stored in $new_path.
43591   new_path="$input_to_shortpath"
43592 
43593   input_path="$input_to_shortpath"
43594   # Check if we need to convert this using DOS-style short mode. If the path
43595   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43596   # take no chances and rewrite it.
43597   # Note: m4 eats our [], so we need to use [ and ] instead.
43598   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43599   if test "x$has_forbidden_chars" != x; then
43600     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43601     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43602     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43603     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43604       # Going to short mode and back again did indeed matter. Since short mode is
43605       # case insensitive, let's make it lowercase to improve readability.
43606       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43607       # Now convert it back to Unix-style (cygpath)
43608       input_path=`$CYGPATH -u "$shortmode_path"`
43609       new_path="$input_path"
43610     fi
43611   fi
43612 
43613   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43614   if test "x$test_cygdrive_prefix" = x; then
43615     # As a simple fix, exclude /usr/bin since it's not a real path.
43616     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43617       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43618       # a path prefixed by /cygdrive for fixpath to work.
43619       new_path="$CYGWIN_ROOT_PATH$input_path"
43620     fi
43621   fi
43622 
43623   # remove trailing .exe if any
43624   new_path="${new_path/%.exe/}"
43625 
43626     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43627 
43628   # First separate the path from the arguments. This will split at the first
43629   # space.
43630   complete="$OBJCOPY"
43631   path="${complete%% *}"
43632   tmp="$complete EOL"
43633   arguments="${tmp#* }"
43634 
43635   # Input might be given as Windows format, start by converting to
43636   # unix format.
43637   new_path="$path"
43638 
43639   windows_path="$new_path"
43640   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43641     unix_path=`$CYGPATH -u "$windows_path"`
43642     new_path="$unix_path"
43643   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43644     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43645     new_path="$unix_path"
43646   fi
43647 
43648 
43649   # Now try to locate executable using which
43650   new_path=`$WHICH "$new_path" 2> /dev/null`
43651 
43652   if test "x$new_path" = x; then
43653     # Oops. Which didn't find the executable.
43654     # The splitting of arguments from the executable at a space might have been incorrect,
43655     # since paths with space are more likely in Windows. Give it another try with the whole
43656     # argument.
43657     path="$complete"
43658     arguments="EOL"
43659     new_path="$path"
43660 
43661   windows_path="$new_path"
43662   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43663     unix_path=`$CYGPATH -u "$windows_path"`
43664     new_path="$unix_path"
43665   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43666     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43667     new_path="$unix_path"
43668   fi
43669 
43670 
43671     new_path=`$WHICH "$new_path" 2> /dev/null`
43672     # bat and cmd files are not always considered executable in MSYS causing which
43673     # to not find them
43674     if test "x$new_path" = x \
43675         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43676         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43677       new_path="$path"
43678 
43679   windows_path="$new_path"
43680   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43681     unix_path=`$CYGPATH -u "$windows_path"`
43682     new_path="$unix_path"
43683   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43684     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43685     new_path="$unix_path"
43686   fi
43687 
43688     fi
43689 
43690     if test "x$new_path" = x; then
43691       # It's still not found. Now this is an unrecoverable error.
43692       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43693 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43694       has_space=`$ECHO "$complete" | $GREP " "`
43695       if test "x$has_space" != x; then
43696         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43697 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43698       fi
43699       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43700     fi
43701   fi
43702 
43703   # Now new_path has a complete unix path to the binary
43704   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43705     # Keep paths in /bin as-is, but remove trailing .exe if any
43706     new_path="${new_path/%.exe/}"
43707     # Do not save /bin paths to all_fixpath_prefixes!
43708   else
43709     # Not in mixed or Windows style, start by that.
43710     new_path=`cmd //c echo $new_path`
43711 
43712   input_path="$new_path"
43713   # Check if we need to convert this using DOS-style short mode. If the path
43714   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43715   # take no chances and rewrite it.
43716   # Note: m4 eats our [], so we need to use [ and ] instead.
43717   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43718   if test "x$has_forbidden_chars" != x; then
43719     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43720     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43721   fi
43722 
43723     # Output is in $new_path
43724 
43725   windows_path="$new_path"
43726   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43727     unix_path=`$CYGPATH -u "$windows_path"`
43728     new_path="$unix_path"
43729   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43730     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43731     new_path="$unix_path"
43732   fi
43733 
43734     # remove trailing .exe if any
43735     new_path="${new_path/%.exe/}"
43736 
43737     # Save the first 10 bytes of this path to the storage, so fixpath can work.
43738     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43739   fi
43740 
43741     else
43742       # We're on a unix platform. Hooray! :)
43743       # First separate the path from the arguments. This will split at the first
43744       # space.
43745       complete="$OBJCOPY"
43746       path="${complete%% *}"
43747       tmp="$complete EOL"
43748       arguments="${tmp#* }"
43749 
43750       # Cannot rely on the command "which" here since it doesn't always work.
43751       is_absolute_path=`$ECHO "$path" | $GREP ^/`
43752       if test -z "$is_absolute_path"; then
43753         # Path to executable is not absolute. Find it.
43754         IFS_save="$IFS"
43755         IFS=:
43756         for p in $PATH; do
43757           if test -f "$p/$path" && test -x "$p/$path"; then
43758             new_path="$p/$path"
43759             break
43760           fi
43761         done
43762         IFS="$IFS_save"
43763       else
43764         # This is an absolute path, we can use it without further modifications.
43765         new_path="$path"
43766       fi
43767 
43768       if test "x$new_path" = x; then
43769         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43770 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43771         has_space=`$ECHO "$complete" | $GREP " "`
43772         if test "x$has_space" != x; then
43773           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43774 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43775         fi
43776         as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43777       fi
43778     fi
43779 
43780     # Now join together the path and the arguments once again
43781     if test "x$arguments" != xEOL; then
43782       new_complete="$new_path ${arguments% *}"
43783     else
43784       new_complete="$new_path"
43785     fi
43786 
43787     if test "x$complete" != "x$new_complete"; then
43788       OBJCOPY="$new_complete"
43789       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
43790 $as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
43791     fi
43792   fi
43793 
43794       if test "x$OPENJDK_BUILD_OS" = xsolaris; then
43795         # objcopy prior to 2.21.1 on solaris is broken and is not usable.
43796         # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
43797         # - version number is last blank separate word on first line
43798         # - version number formats that have been seen:
43799         #   - <major>.<minor>
43800         #   - <major>.<minor>.<micro>
43801         OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
43802         # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
43803          OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
43804               -e 's/.* //' \
43805               -e '/^[01]\./b bad' \
43806               -e '/^2\./{' \
43807               -e '  s/^2\.//' \
43808               -e '  /^[0-9]$/b bad' \
43809               -e '  /^[0-9]\./b bad' \
43810               -e '  /^1[0-9]$/b bad' \
43811               -e '  /^1[0-9]\./b bad' \
43812               -e '  /^20\./b bad' \
43813               -e '  /^21\.0$/b bad' \
43814               -e '  /^21\.0\./b bad' \
43815               -e '}' \
43816               -e ':good' \
43817               -e 's/.*/VALID_VERSION/p' \
43818               -e 'q' \
43819               -e ':bad' \
43820               -e 's/.*/BAD_VERSION/p' \
43821               -e 'q'`
43822         if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
43823           OBJCOPY=
43824           { $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
43825 $as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
43826           { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
43827 $as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
43828           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
43829 $as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
43830           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
43831 $as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
43832           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
43833 $as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
43834         fi
43835       fi
43836     fi
43837   fi
43838 
43839 
43840 
43841   # Publish this variable in the help.
43842 
43843 
43844   if [ -z "${OBJDUMP+x}" ]; then
43845     # The variable is not set by user, try to locate tool using the code snippet
43846     if test -n "$ac_tool_prefix"; then
43847   for ac_prog in gobjdump objdump
43848   do
43849     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43850 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43851 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43852 $as_echo_n "checking for $ac_word... " >&6; }
43853 if ${ac_cv_prog_OBJDUMP+:} false; then :
43854   $as_echo_n "(cached) " >&6
43855 else
43856   if test -n "$OBJDUMP"; then
43857   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43858 else
43859 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43860 for as_dir in $PATH
43861 do
43862   IFS=$as_save_IFS
43863   test -z "$as_dir" && as_dir=.
43864     for ac_exec_ext in '' $ac_executable_extensions; do
43865   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43866     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43867     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43868     break 2
43869   fi
43870 done
43871   done
43872 IFS=$as_save_IFS
43873 
43874 fi
43875 fi
43876 OBJDUMP=$ac_cv_prog_OBJDUMP
43877 if test -n "$OBJDUMP"; then
43878   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43879 $as_echo "$OBJDUMP" >&6; }
43880 else
43881   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43882 $as_echo "no" >&6; }
43883 fi
43884 
43885 
43886     test -n "$OBJDUMP" && break
43887   done
43888 fi
43889 if test -z "$OBJDUMP"; then
43890   ac_ct_OBJDUMP=$OBJDUMP
43891   for ac_prog in gobjdump objdump
43892 do
43893   # Extract the first word of "$ac_prog", so it can be a program name with args.
43894 set dummy $ac_prog; ac_word=$2
43895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43896 $as_echo_n "checking for $ac_word... " >&6; }
43897 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43898   $as_echo_n "(cached) " >&6
43899 else
43900   if test -n "$ac_ct_OBJDUMP"; then
43901   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43902 else
43903 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43904 for as_dir in $PATH
43905 do
43906   IFS=$as_save_IFS
43907   test -z "$as_dir" && as_dir=.
43908     for ac_exec_ext in '' $ac_executable_extensions; do
43909   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43910     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43911     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43912     break 2
43913   fi
43914 done
43915   done
43916 IFS=$as_save_IFS
43917 
43918 fi
43919 fi
43920 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43921 if test -n "$ac_ct_OBJDUMP"; then
43922   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43923 $as_echo "$ac_ct_OBJDUMP" >&6; }
43924 else
43925   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43926 $as_echo "no" >&6; }
43927 fi
43928 
43929 
43930   test -n "$ac_ct_OBJDUMP" && break
43931 done
43932 
43933   if test "x$ac_ct_OBJDUMP" = x; then
43934     OBJDUMP=""
43935   else
43936     case $cross_compiling:$ac_tool_warned in
43937 yes:)
43938 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43939 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43940 ac_tool_warned=yes ;;
43941 esac
43942     OBJDUMP=$ac_ct_OBJDUMP
43943   fi
43944 fi
43945 
43946   else
43947     # The variable is set, but is it from the command line or the environment?
43948 
43949     # Try to remove the string !OBJDUMP! from our list.
43950     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
43951     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43952       # If it failed, the variable was not from the command line. Ignore it,
43953       # but warn the user (except for BASH, which is always set by the calling BASH).
43954       if test "xOBJDUMP" != xBASH; then
43955         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
43956 $as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
43957       fi
43958       # Try to locate tool using the code snippet
43959       if test -n "$ac_tool_prefix"; then
43960   for ac_prog in gobjdump objdump
43961   do
43962     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43963 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43965 $as_echo_n "checking for $ac_word... " >&6; }
43966 if ${ac_cv_prog_OBJDUMP+:} false; then :
43967   $as_echo_n "(cached) " >&6
43968 else
43969   if test -n "$OBJDUMP"; then
43970   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43971 else
43972 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43973 for as_dir in $PATH
43974 do
43975   IFS=$as_save_IFS
43976   test -z "$as_dir" && as_dir=.
43977     for ac_exec_ext in '' $ac_executable_extensions; do
43978   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43979     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43980     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43981     break 2
43982   fi
43983 done
43984   done
43985 IFS=$as_save_IFS
43986 
43987 fi
43988 fi
43989 OBJDUMP=$ac_cv_prog_OBJDUMP
43990 if test -n "$OBJDUMP"; then
43991   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43992 $as_echo "$OBJDUMP" >&6; }
43993 else
43994   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43995 $as_echo "no" >&6; }
43996 fi
43997 
43998 
43999     test -n "$OBJDUMP" && break
44000   done
44001 fi
44002 if test -z "$OBJDUMP"; then
44003   ac_ct_OBJDUMP=$OBJDUMP
44004   for ac_prog in gobjdump objdump
44005 do
44006   # Extract the first word of "$ac_prog", so it can be a program name with args.
44007 set dummy $ac_prog; ac_word=$2
44008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44009 $as_echo_n "checking for $ac_word... " >&6; }
44010 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
44011   $as_echo_n "(cached) " >&6
44012 else
44013   if test -n "$ac_ct_OBJDUMP"; then
44014   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
44015 else
44016 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44017 for as_dir in $PATH
44018 do
44019   IFS=$as_save_IFS
44020   test -z "$as_dir" && as_dir=.
44021     for ac_exec_ext in '' $ac_executable_extensions; do
44022   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44023     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
44024     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44025     break 2
44026   fi
44027 done
44028   done
44029 IFS=$as_save_IFS
44030 
44031 fi
44032 fi
44033 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
44034 if test -n "$ac_ct_OBJDUMP"; then
44035   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
44036 $as_echo "$ac_ct_OBJDUMP" >&6; }
44037 else
44038   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44039 $as_echo "no" >&6; }
44040 fi
44041 
44042 
44043   test -n "$ac_ct_OBJDUMP" && break
44044 done
44045 
44046   if test "x$ac_ct_OBJDUMP" = x; then
44047     OBJDUMP=""
44048   else
44049     case $cross_compiling:$ac_tool_warned in
44050 yes:)
44051 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
44052 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
44053 ac_tool_warned=yes ;;
44054 esac
44055     OBJDUMP=$ac_ct_OBJDUMP
44056   fi
44057 fi
44058 
44059     else
44060       # If it succeeded, then it was overridden by the user. We will use it
44061       # for the tool.
44062 
44063       # First remove it from the list of overridden variables, so we can test
44064       # for unknown variables in the end.
44065       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44066 
44067       # Check if we try to supply an empty value
44068       if test "x$OBJDUMP" = x; then
44069         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
44070 $as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
44071         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
44072 $as_echo_n "checking for OBJDUMP... " >&6; }
44073         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44074 $as_echo "disabled" >&6; }
44075       else
44076         # Check if the provided tool contains a complete path.
44077         tool_specified="$OBJDUMP"
44078         tool_basename="${tool_specified##*/}"
44079         if test "x$tool_basename" = "x$tool_specified"; then
44080           # A command without a complete path is provided, search $PATH.
44081           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
44082 $as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
44083           # Extract the first word of "$tool_basename", so it can be a program name with args.
44084 set dummy $tool_basename; ac_word=$2
44085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44086 $as_echo_n "checking for $ac_word... " >&6; }
44087 if ${ac_cv_path_OBJDUMP+:} false; then :
44088   $as_echo_n "(cached) " >&6
44089 else
44090   case $OBJDUMP in
44091   [\\/]* | ?:[\\/]*)
44092   ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
44093   ;;
44094   *)
44095   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44096 for as_dir in $PATH
44097 do
44098   IFS=$as_save_IFS
44099   test -z "$as_dir" && as_dir=.
44100     for ac_exec_ext in '' $ac_executable_extensions; do
44101   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44102     ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
44103     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44104     break 2
44105   fi
44106 done
44107   done
44108 IFS=$as_save_IFS
44109 
44110   ;;
44111 esac
44112 fi
44113 OBJDUMP=$ac_cv_path_OBJDUMP
44114 if test -n "$OBJDUMP"; then
44115   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
44116 $as_echo "$OBJDUMP" >&6; }
44117 else
44118   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44119 $as_echo "no" >&6; }
44120 fi
44121 
44122 
44123           if test "x$OBJDUMP" = x; then
44124             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44125           fi
44126         else
44127           # Otherwise we believe it is a complete path. Use it as it is.
44128           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
44129 $as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
44130           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
44131 $as_echo_n "checking for OBJDUMP... " >&6; }
44132           if test ! -x "$tool_specified"; then
44133             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44134 $as_echo "not found" >&6; }
44135             as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
44136           fi
44137           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44138 $as_echo "$tool_specified" >&6; }
44139         fi
44140       fi
44141     fi
44142 
44143   fi
44144 
44145 
44146   if test "x$OBJDUMP" != x; then
44147     # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
44148     # bails if argument is missing.
44149 
44150   # Only process if variable expands to non-empty
44151 
44152   if test "x$OBJDUMP" != x; then
44153     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44154 
44155   # First separate the path from the arguments. This will split at the first
44156   # space.
44157   complete="$OBJDUMP"
44158   path="${complete%% *}"
44159   tmp="$complete EOL"
44160   arguments="${tmp#* }"
44161 
44162   # Input might be given as Windows format, start by converting to
44163   # unix format.
44164   new_path=`$CYGPATH -u "$path"`
44165 
44166   # Now try to locate executable using which
44167   new_path=`$WHICH "$new_path" 2> /dev/null`
44168   # bat and cmd files are not always considered executable in cygwin causing which
44169   # to not find them
44170   if test "x$new_path" = x \
44171       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44172       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44173     new_path=`$CYGPATH -u "$path"`
44174   fi
44175   if test "x$new_path" = x; then
44176     # Oops. Which didn't find the executable.
44177     # The splitting of arguments from the executable at a space might have been incorrect,
44178     # since paths with space are more likely in Windows. Give it another try with the whole
44179     # argument.
44180     path="$complete"
44181     arguments="EOL"
44182     new_path=`$CYGPATH -u "$path"`
44183     new_path=`$WHICH "$new_path" 2> /dev/null`
44184     # bat and cmd files are not always considered executable in cygwin causing which
44185     # to not find them
44186     if test "x$new_path" = x \
44187         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44188         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44189       new_path=`$CYGPATH -u "$path"`
44190     fi
44191     if test "x$new_path" = x; then
44192       # It's still not found. Now this is an unrecoverable error.
44193       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44194 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44195       has_space=`$ECHO "$complete" | $GREP " "`
44196       if test "x$has_space" != x; then
44197         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44198 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44199       fi
44200       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44201     fi
44202   fi
44203 
44204   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44205   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44206   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44207   # "foo.exe" is OK but "foo" is an error.
44208   #
44209   # This test is therefore slightly more accurate than "test -f" to check for file presence.
44210   # It is also a way to make sure we got the proper file name for the real test later on.
44211   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44212   if test "x$test_shortpath" = x; then
44213     # Short path failed, file does not exist as specified.
44214     # Try adding .exe or .cmd
44215     if test -f "${new_path}.exe"; then
44216       input_to_shortpath="${new_path}.exe"
44217     elif test -f "${new_path}.cmd"; then
44218       input_to_shortpath="${new_path}.cmd"
44219     else
44220       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
44221 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
44222       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44223 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44224       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44225     fi
44226   else
44227     input_to_shortpath="$new_path"
44228   fi
44229 
44230   # Call helper function which possibly converts this using DOS-style short mode.
44231   # If so, the updated path is stored in $new_path.
44232   new_path="$input_to_shortpath"
44233 
44234   input_path="$input_to_shortpath"
44235   # Check if we need to convert this using DOS-style short mode. If the path
44236   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44237   # take no chances and rewrite it.
44238   # Note: m4 eats our [], so we need to use [ and ] instead.
44239   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44240   if test "x$has_forbidden_chars" != x; then
44241     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44242     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44243     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44244     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44245       # Going to short mode and back again did indeed matter. Since short mode is
44246       # case insensitive, let's make it lowercase to improve readability.
44247       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44248       # Now convert it back to Unix-style (cygpath)
44249       input_path=`$CYGPATH -u "$shortmode_path"`
44250       new_path="$input_path"
44251     fi
44252   fi
44253 
44254   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44255   if test "x$test_cygdrive_prefix" = x; then
44256     # As a simple fix, exclude /usr/bin since it's not a real path.
44257     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44258       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44259       # a path prefixed by /cygdrive for fixpath to work.
44260       new_path="$CYGWIN_ROOT_PATH$input_path"
44261     fi
44262   fi
44263 
44264   # remove trailing .exe if any
44265   new_path="${new_path/%.exe/}"
44266 
44267     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44268 
44269   # First separate the path from the arguments. This will split at the first
44270   # space.
44271   complete="$OBJDUMP"
44272   path="${complete%% *}"
44273   tmp="$complete EOL"
44274   arguments="${tmp#* }"
44275 
44276   # Input might be given as Windows format, start by converting to
44277   # unix format.
44278   new_path="$path"
44279 
44280   windows_path="$new_path"
44281   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44282     unix_path=`$CYGPATH -u "$windows_path"`
44283     new_path="$unix_path"
44284   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44285     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44286     new_path="$unix_path"
44287   fi
44288 
44289 
44290   # Now try to locate executable using which
44291   new_path=`$WHICH "$new_path" 2> /dev/null`
44292 
44293   if test "x$new_path" = x; then
44294     # Oops. Which didn't find the executable.
44295     # The splitting of arguments from the executable at a space might have been incorrect,
44296     # since paths with space are more likely in Windows. Give it another try with the whole
44297     # argument.
44298     path="$complete"
44299     arguments="EOL"
44300     new_path="$path"
44301 
44302   windows_path="$new_path"
44303   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44304     unix_path=`$CYGPATH -u "$windows_path"`
44305     new_path="$unix_path"
44306   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44307     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44308     new_path="$unix_path"
44309   fi
44310 
44311 
44312     new_path=`$WHICH "$new_path" 2> /dev/null`
44313     # bat and cmd files are not always considered executable in MSYS causing which
44314     # to not find them
44315     if test "x$new_path" = x \
44316         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44317         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44318       new_path="$path"
44319 
44320   windows_path="$new_path"
44321   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44322     unix_path=`$CYGPATH -u "$windows_path"`
44323     new_path="$unix_path"
44324   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44325     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44326     new_path="$unix_path"
44327   fi
44328 
44329     fi
44330 
44331     if test "x$new_path" = x; then
44332       # It's still not found. Now this is an unrecoverable error.
44333       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44334 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44335       has_space=`$ECHO "$complete" | $GREP " "`
44336       if test "x$has_space" != x; then
44337         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44338 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44339       fi
44340       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44341     fi
44342   fi
44343 
44344   # Now new_path has a complete unix path to the binary
44345   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44346     # Keep paths in /bin as-is, but remove trailing .exe if any
44347     new_path="${new_path/%.exe/}"
44348     # Do not save /bin paths to all_fixpath_prefixes!
44349   else
44350     # Not in mixed or Windows style, start by that.
44351     new_path=`cmd //c echo $new_path`
44352 
44353   input_path="$new_path"
44354   # Check if we need to convert this using DOS-style short mode. If the path
44355   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44356   # take no chances and rewrite it.
44357   # Note: m4 eats our [], so we need to use [ and ] instead.
44358   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44359   if test "x$has_forbidden_chars" != x; then
44360     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44361     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44362   fi
44363 
44364     # Output is in $new_path
44365 
44366   windows_path="$new_path"
44367   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44368     unix_path=`$CYGPATH -u "$windows_path"`
44369     new_path="$unix_path"
44370   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44371     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44372     new_path="$unix_path"
44373   fi
44374 
44375     # remove trailing .exe if any
44376     new_path="${new_path/%.exe/}"
44377 
44378     # Save the first 10 bytes of this path to the storage, so fixpath can work.
44379     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44380   fi
44381 
44382     else
44383       # We're on a unix platform. Hooray! :)
44384       # First separate the path from the arguments. This will split at the first
44385       # space.
44386       complete="$OBJDUMP"
44387       path="${complete%% *}"
44388       tmp="$complete EOL"
44389       arguments="${tmp#* }"
44390 
44391       # Cannot rely on the command "which" here since it doesn't always work.
44392       is_absolute_path=`$ECHO "$path" | $GREP ^/`
44393       if test -z "$is_absolute_path"; then
44394         # Path to executable is not absolute. Find it.
44395         IFS_save="$IFS"
44396         IFS=:
44397         for p in $PATH; do
44398           if test -f "$p/$path" && test -x "$p/$path"; then
44399             new_path="$p/$path"
44400             break
44401           fi
44402         done
44403         IFS="$IFS_save"
44404       else
44405         # This is an absolute path, we can use it without further modifications.
44406         new_path="$path"
44407       fi
44408 
44409       if test "x$new_path" = x; then
44410         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44411 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44412         has_space=`$ECHO "$complete" | $GREP " "`
44413         if test "x$has_space" != x; then
44414           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44415 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44416         fi
44417         as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44418       fi
44419     fi
44420 
44421     # Now join together the path and the arguments once again
44422     if test "x$arguments" != xEOL; then
44423       new_complete="$new_path ${arguments% *}"
44424     else
44425       new_complete="$new_path"
44426     fi
44427 
44428     if test "x$complete" != "x$new_complete"; then
44429       OBJDUMP="$new_complete"
44430       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
44431 $as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
44432     fi
44433   fi
44434 
44435   fi
44436 
44437 
44438   # Restore old path, except for the microsoft toolchain, which requires VS_PATH
44439   # to remain in place. Otherwise the compiler will not work in some siutations
44440   # in later configure checks.
44441   if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
44442     PATH="$OLD_PATH"
44443   fi
44444 
44445   # Restore the flags to the user specified values.
44446   # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
44447   CFLAGS="$ORG_CFLAGS"
44448   CXXFLAGS="$ORG_CXXFLAGS"
44449 
44450 
44451 # Finally do some processing after the detection phase
44452 
44453   if test "x$COMPILE_TYPE" = "xcross"; then
44454     # Now we need to find a C/C++ compiler that can build executables for the
44455     # build platform. We can't use the AC_PROG_CC macro, since it can only be
44456     # used once. Also, we need to do this without adding a tools dir to the
44457     # path, otherwise we might pick up cross-compilers which don't use standard
44458     # naming.
44459 
44460     OLDPATH="$PATH"
44461 
44462 
44463 # Check whether --with-build-devkit was given.
44464 if test "${with_build_devkit+set}" = set; then :
44465   withval=$with_build_devkit;
44466 fi
44467 
44468     if test "x$with_build_devkit" = "xyes"; then
44469       as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
44470     elif test -n "$with_build_devkit"; then
44471       if test ! -d "$with_build_devkit"; then
44472         as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
44473       else
44474 
44475   # Only process if variable expands to non-empty
44476 
44477   if test "x$with_build_devkit" != x; then
44478     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44479 
44480   # Input might be given as Windows format, start by converting to
44481   # unix format.
44482   path="$with_build_devkit"
44483   new_path=`$CYGPATH -u "$path"`
44484 
44485   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44486   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44487   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44488   # "foo.exe" is OK but "foo" is an error.
44489   #
44490   # This test is therefore slightly more accurate than "test -f" to check for file precense.
44491   # It is also a way to make sure we got the proper file name for the real test later on.
44492   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44493   if test "x$test_shortpath" = x; then
44494     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
44495 $as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
44496     as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
44497   fi
44498 
44499   # Call helper function which possibly converts this using DOS-style short mode.
44500   # If so, the updated path is stored in $new_path.
44501 
44502   input_path="$new_path"
44503   # Check if we need to convert this using DOS-style short mode. If the path
44504   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44505   # take no chances and rewrite it.
44506   # Note: m4 eats our [], so we need to use [ and ] instead.
44507   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44508   if test "x$has_forbidden_chars" != x; then
44509     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44510     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44511     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44512     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44513       # Going to short mode and back again did indeed matter. Since short mode is
44514       # case insensitive, let's make it lowercase to improve readability.
44515       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44516       # Now convert it back to Unix-style (cygpath)
44517       input_path=`$CYGPATH -u "$shortmode_path"`
44518       new_path="$input_path"
44519     fi
44520   fi
44521 
44522   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44523   if test "x$test_cygdrive_prefix" = x; then
44524     # As a simple fix, exclude /usr/bin since it's not a real path.
44525     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44526       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44527       # a path prefixed by /cygdrive for fixpath to work.
44528       new_path="$CYGWIN_ROOT_PATH$input_path"
44529     fi
44530   fi
44531 
44532 
44533   if test "x$path" != "x$new_path"; then
44534     with_build_devkit="$new_path"
44535     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
44536 $as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
44537   fi
44538 
44539     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44540 
44541   path="$with_build_devkit"
44542   has_colon=`$ECHO $path | $GREP ^.:`
44543   new_path="$path"
44544   if test "x$has_colon" = x; then
44545     # Not in mixed or Windows style, start by that.
44546     new_path=`cmd //c echo $path`
44547   fi
44548 
44549 
44550   input_path="$new_path"
44551   # Check if we need to convert this using DOS-style short mode. If the path
44552   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44553   # take no chances and rewrite it.
44554   # Note: m4 eats our [], so we need to use [ and ] instead.
44555   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44556   if test "x$has_forbidden_chars" != x; then
44557     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44558     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44559   fi
44560 
44561 
44562   windows_path="$new_path"
44563   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44564     unix_path=`$CYGPATH -u "$windows_path"`
44565     new_path="$unix_path"
44566   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44567     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44568     new_path="$unix_path"
44569   fi
44570 
44571   if test "x$path" != "x$new_path"; then
44572     with_build_devkit="$new_path"
44573     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
44574 $as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
44575   fi
44576 
44577   # Save the first 10 bytes of this path to the storage, so fixpath can work.
44578   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44579 
44580     else
44581       # We're on a unix platform. Hooray! :)
44582       path="$with_build_devkit"
44583       has_space=`$ECHO "$path" | $GREP " "`
44584       if test "x$has_space" != x; then
44585         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
44586 $as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
44587         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44588       fi
44589 
44590       # Use eval to expand a potential ~
44591       eval path="$path"
44592       if test ! -f "$path" && test ! -d "$path"; then
44593         as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
44594       fi
44595 
44596       if test -d "$path"; then
44597         with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
44598       else
44599         dir="`$DIRNAME "$path"`"
44600         base="`$BASENAME "$path"`"
44601         with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
44602       fi
44603     fi
44604   fi
44605 
44606         BUILD_DEVKIT_ROOT="$with_build_devkit"
44607         # Check for a meta data info file in the root of the devkit
44608         if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
44609           # Process devkit.info so that existing devkit variables are not
44610           # modified by this
44611           $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
44612               -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
44613               -e "s/\$host/\$build/g" \
44614               $BUILD_DEVKIT_ROOT/devkit.info \
44615               > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
44616           . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
44617           # This potentially sets the following:
44618           # A descriptive name of the devkit
44619 
44620   if test "x$BUILD_DEVKIT_NAME" = x; then
44621     eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
44622   fi
44623 
44624           # Corresponds to --with-extra-path
44625 
44626   if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
44627     eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
44628   fi
44629 
44630           # Corresponds to --with-toolchain-path
44631 
44632   if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44633     eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
44634   fi
44635 
44636           # Corresponds to --with-sysroot
44637 
44638   if test "x$BUILD_DEVKIT_SYSROOT" = x; then
44639     eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
44640   fi
44641 
44642           # Skip the Window specific parts
44643         fi
44644 
44645         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
44646 $as_echo_n "checking for build platform devkit... " >&6; }
44647         if test "x$BUILD_DEVKIT_NAME" != x; then
44648           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
44649 $as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
44650         else
44651           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
44652 $as_echo "$BUILD_DEVKIT_ROOT" >&6; }
44653         fi
44654 
44655         BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
44656 
44657   if test "x$BUILD_SYSROOT" != "x"; then
44658     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44659       if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44660         # Solaris Studio does not have a concept of sysroot. Instead we must
44661         # make sure the default include and lib dirs are appended to each
44662         # compile and link command line. Must also add -I-xbuiltin to enable
44663         # inlining of system functions and intrinsics.
44664         BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
44665         BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
44666             -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
44667       fi
44668     elif test "x$TOOLCHAIN_TYPE" = xgcc; then
44669       BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
44670       BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
44671     elif test "x$TOOLCHAIN_TYPE" = xclang; then
44672       BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
44673       BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
44674     fi
44675     # The global CFLAGS and LDFLAGS variables need these for configure to function
44676     BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
44677     BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
44678     BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44679     BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44680   fi
44681 
44682   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44683     # We also need -iframework<path>/System/Library/Frameworks
44684     BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44685     BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44686     # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
44687     # set this here so it doesn't have to be peppered throughout the forest
44688     BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44689     BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44690   fi
44691 
44692 
44693 
44694 
44695 
44696          # Fallback default of just /bin if DEVKIT_PATH is not defined
44697         if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44698           BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
44699         fi
44700         PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
44701       fi
44702     fi
44703 
44704     # FIXME: we should list the discovered compilers as an exclude pattern!
44705     # If we do that, we can do this detection before POST_DETECTION, and still
44706     # find the build compilers in the tools dir, if needed.
44707 
44708 
44709 
44710   # Publish this variable in the help.
44711 
44712 
44713   if [ -z "${BUILD_CC+x}" ]; then
44714     # The variable is not set by user, try to locate tool using the code snippet
44715     for ac_prog in cl cc gcc
44716 do
44717   # Extract the first word of "$ac_prog", so it can be a program name with args.
44718 set dummy $ac_prog; ac_word=$2
44719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44720 $as_echo_n "checking for $ac_word... " >&6; }
44721 if ${ac_cv_path_BUILD_CC+:} false; then :
44722   $as_echo_n "(cached) " >&6
44723 else
44724   case $BUILD_CC in
44725   [\\/]* | ?:[\\/]*)
44726   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44727   ;;
44728   *)
44729   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44730 for as_dir in $PATH
44731 do
44732   IFS=$as_save_IFS
44733   test -z "$as_dir" && as_dir=.
44734     for ac_exec_ext in '' $ac_executable_extensions; do
44735   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44736     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44737     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44738     break 2
44739   fi
44740 done
44741   done
44742 IFS=$as_save_IFS
44743 
44744   ;;
44745 esac
44746 fi
44747 BUILD_CC=$ac_cv_path_BUILD_CC
44748 if test -n "$BUILD_CC"; then
44749   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44750 $as_echo "$BUILD_CC" >&6; }
44751 else
44752   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44753 $as_echo "no" >&6; }
44754 fi
44755 
44756 
44757   test -n "$BUILD_CC" && break
44758 done
44759 
44760   else
44761     # The variable is set, but is it from the command line or the environment?
44762 
44763     # Try to remove the string !BUILD_CC! from our list.
44764     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
44765     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44766       # If it failed, the variable was not from the command line. Ignore it,
44767       # but warn the user (except for BASH, which is always set by the calling BASH).
44768       if test "xBUILD_CC" != xBASH; then
44769         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
44770 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
44771       fi
44772       # Try to locate tool using the code snippet
44773       for ac_prog in cl cc gcc
44774 do
44775   # Extract the first word of "$ac_prog", so it can be a program name with args.
44776 set dummy $ac_prog; ac_word=$2
44777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44778 $as_echo_n "checking for $ac_word... " >&6; }
44779 if ${ac_cv_path_BUILD_CC+:} false; then :
44780   $as_echo_n "(cached) " >&6
44781 else
44782   case $BUILD_CC in
44783   [\\/]* | ?:[\\/]*)
44784   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44785   ;;
44786   *)
44787   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44788 for as_dir in $PATH
44789 do
44790   IFS=$as_save_IFS
44791   test -z "$as_dir" && as_dir=.
44792     for ac_exec_ext in '' $ac_executable_extensions; do
44793   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44794     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44795     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44796     break 2
44797   fi
44798 done
44799   done
44800 IFS=$as_save_IFS
44801 
44802   ;;
44803 esac
44804 fi
44805 BUILD_CC=$ac_cv_path_BUILD_CC
44806 if test -n "$BUILD_CC"; then
44807   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44808 $as_echo "$BUILD_CC" >&6; }
44809 else
44810   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44811 $as_echo "no" >&6; }
44812 fi
44813 
44814 
44815   test -n "$BUILD_CC" && break
44816 done
44817 
44818     else
44819       # If it succeeded, then it was overridden by the user. We will use it
44820       # for the tool.
44821 
44822       # First remove it from the list of overridden variables, so we can test
44823       # for unknown variables in the end.
44824       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44825 
44826       # Check if we try to supply an empty value
44827       if test "x$BUILD_CC" = x; then
44828         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
44829 $as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
44830         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44831 $as_echo_n "checking for BUILD_CC... " >&6; }
44832         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44833 $as_echo "disabled" >&6; }
44834       else
44835         # Check if the provided tool contains a complete path.
44836         tool_specified="$BUILD_CC"
44837         tool_basename="${tool_specified##*/}"
44838         if test "x$tool_basename" = "x$tool_specified"; then
44839           # A command without a complete path is provided, search $PATH.
44840           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
44841 $as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
44842           # Extract the first word of "$tool_basename", so it can be a program name with args.
44843 set dummy $tool_basename; ac_word=$2
44844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44845 $as_echo_n "checking for $ac_word... " >&6; }
44846 if ${ac_cv_path_BUILD_CC+:} false; then :
44847   $as_echo_n "(cached) " >&6
44848 else
44849   case $BUILD_CC in
44850   [\\/]* | ?:[\\/]*)
44851   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44852   ;;
44853   *)
44854   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44855 for as_dir in $PATH
44856 do
44857   IFS=$as_save_IFS
44858   test -z "$as_dir" && as_dir=.
44859     for ac_exec_ext in '' $ac_executable_extensions; do
44860   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44861     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44862     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44863     break 2
44864   fi
44865 done
44866   done
44867 IFS=$as_save_IFS
44868 
44869   ;;
44870 esac
44871 fi
44872 BUILD_CC=$ac_cv_path_BUILD_CC
44873 if test -n "$BUILD_CC"; then
44874   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44875 $as_echo "$BUILD_CC" >&6; }
44876 else
44877   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44878 $as_echo "no" >&6; }
44879 fi
44880 
44881 
44882           if test "x$BUILD_CC" = x; then
44883             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44884           fi
44885         else
44886           # Otherwise we believe it is a complete path. Use it as it is.
44887           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
44888 $as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
44889           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44890 $as_echo_n "checking for BUILD_CC... " >&6; }
44891           if test ! -x "$tool_specified"; then
44892             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44893 $as_echo "not found" >&6; }
44894             as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
44895           fi
44896           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44897 $as_echo "$tool_specified" >&6; }
44898         fi
44899       fi
44900     fi
44901 
44902   fi
44903 
44904 
44905 
44906   if test "x$BUILD_CC" = x; then
44907     as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
44908   fi
44909 
44910 
44911 
44912   # Only process if variable expands to non-empty
44913 
44914   if test "x$BUILD_CC" != x; then
44915     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44916 
44917   # First separate the path from the arguments. This will split at the first
44918   # space.
44919   complete="$BUILD_CC"
44920   path="${complete%% *}"
44921   tmp="$complete EOL"
44922   arguments="${tmp#* }"
44923 
44924   # Input might be given as Windows format, start by converting to
44925   # unix format.
44926   new_path=`$CYGPATH -u "$path"`
44927 
44928   # Now try to locate executable using which
44929   new_path=`$WHICH "$new_path" 2> /dev/null`
44930   # bat and cmd files are not always considered executable in cygwin causing which
44931   # to not find them
44932   if test "x$new_path" = x \
44933       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44934       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44935     new_path=`$CYGPATH -u "$path"`
44936   fi
44937   if test "x$new_path" = x; then
44938     # Oops. Which didn't find the executable.
44939     # The splitting of arguments from the executable at a space might have been incorrect,
44940     # since paths with space are more likely in Windows. Give it another try with the whole
44941     # argument.
44942     path="$complete"
44943     arguments="EOL"
44944     new_path=`$CYGPATH -u "$path"`
44945     new_path=`$WHICH "$new_path" 2> /dev/null`
44946     # bat and cmd files are not always considered executable in cygwin causing which
44947     # to not find them
44948     if test "x$new_path" = x \
44949         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44950         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44951       new_path=`$CYGPATH -u "$path"`
44952     fi
44953     if test "x$new_path" = x; then
44954       # It's still not found. Now this is an unrecoverable error.
44955       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44956 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44957       has_space=`$ECHO "$complete" | $GREP " "`
44958       if test "x$has_space" != x; then
44959         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44960 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44961       fi
44962       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44963     fi
44964   fi
44965 
44966   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44967   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44968   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44969   # "foo.exe" is OK but "foo" is an error.
44970   #
44971   # This test is therefore slightly more accurate than "test -f" to check for file presence.
44972   # It is also a way to make sure we got the proper file name for the real test later on.
44973   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44974   if test "x$test_shortpath" = x; then
44975     # Short path failed, file does not exist as specified.
44976     # Try adding .exe or .cmd
44977     if test -f "${new_path}.exe"; then
44978       input_to_shortpath="${new_path}.exe"
44979     elif test -f "${new_path}.cmd"; then
44980       input_to_shortpath="${new_path}.cmd"
44981     else
44982       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
44983 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
44984       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44985 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44986       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44987     fi
44988   else
44989     input_to_shortpath="$new_path"
44990   fi
44991 
44992   # Call helper function which possibly converts this using DOS-style short mode.
44993   # If so, the updated path is stored in $new_path.
44994   new_path="$input_to_shortpath"
44995 
44996   input_path="$input_to_shortpath"
44997   # Check if we need to convert this using DOS-style short mode. If the path
44998   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44999   # take no chances and rewrite it.
45000   # Note: m4 eats our [], so we need to use [ and ] instead.
45001   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45002   if test "x$has_forbidden_chars" != x; then
45003     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45004     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45005     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45006     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45007       # Going to short mode and back again did indeed matter. Since short mode is
45008       # case insensitive, let's make it lowercase to improve readability.
45009       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45010       # Now convert it back to Unix-style (cygpath)
45011       input_path=`$CYGPATH -u "$shortmode_path"`
45012       new_path="$input_path"
45013     fi
45014   fi
45015 
45016   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45017   if test "x$test_cygdrive_prefix" = x; then
45018     # As a simple fix, exclude /usr/bin since it's not a real path.
45019     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45020       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45021       # a path prefixed by /cygdrive for fixpath to work.
45022       new_path="$CYGWIN_ROOT_PATH$input_path"
45023     fi
45024   fi
45025 
45026   # remove trailing .exe if any
45027   new_path="${new_path/%.exe/}"
45028 
45029     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45030 
45031   # First separate the path from the arguments. This will split at the first
45032   # space.
45033   complete="$BUILD_CC"
45034   path="${complete%% *}"
45035   tmp="$complete EOL"
45036   arguments="${tmp#* }"
45037 
45038   # Input might be given as Windows format, start by converting to
45039   # unix format.
45040   new_path="$path"
45041 
45042   windows_path="$new_path"
45043   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45044     unix_path=`$CYGPATH -u "$windows_path"`
45045     new_path="$unix_path"
45046   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45047     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45048     new_path="$unix_path"
45049   fi
45050 
45051 
45052   # Now try to locate executable using which
45053   new_path=`$WHICH "$new_path" 2> /dev/null`
45054 
45055   if test "x$new_path" = x; then
45056     # Oops. Which didn't find the executable.
45057     # The splitting of arguments from the executable at a space might have been incorrect,
45058     # since paths with space are more likely in Windows. Give it another try with the whole
45059     # argument.
45060     path="$complete"
45061     arguments="EOL"
45062     new_path="$path"
45063 
45064   windows_path="$new_path"
45065   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45066     unix_path=`$CYGPATH -u "$windows_path"`
45067     new_path="$unix_path"
45068   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45069     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45070     new_path="$unix_path"
45071   fi
45072 
45073 
45074     new_path=`$WHICH "$new_path" 2> /dev/null`
45075     # bat and cmd files are not always considered executable in MSYS causing which
45076     # to not find them
45077     if test "x$new_path" = x \
45078         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45079         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45080       new_path="$path"
45081 
45082   windows_path="$new_path"
45083   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45084     unix_path=`$CYGPATH -u "$windows_path"`
45085     new_path="$unix_path"
45086   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45087     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45088     new_path="$unix_path"
45089   fi
45090 
45091     fi
45092 
45093     if test "x$new_path" = x; then
45094       # It's still not found. Now this is an unrecoverable error.
45095       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45096 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45097       has_space=`$ECHO "$complete" | $GREP " "`
45098       if test "x$has_space" != x; then
45099         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45100 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45101       fi
45102       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45103     fi
45104   fi
45105 
45106   # Now new_path has a complete unix path to the binary
45107   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45108     # Keep paths in /bin as-is, but remove trailing .exe if any
45109     new_path="${new_path/%.exe/}"
45110     # Do not save /bin paths to all_fixpath_prefixes!
45111   else
45112     # Not in mixed or Windows style, start by that.
45113     new_path=`cmd //c echo $new_path`
45114 
45115   input_path="$new_path"
45116   # Check if we need to convert this using DOS-style short mode. If the path
45117   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45118   # take no chances and rewrite it.
45119   # Note: m4 eats our [], so we need to use [ and ] instead.
45120   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45121   if test "x$has_forbidden_chars" != x; then
45122     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45123     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45124   fi
45125 
45126     # Output is in $new_path
45127 
45128   windows_path="$new_path"
45129   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45130     unix_path=`$CYGPATH -u "$windows_path"`
45131     new_path="$unix_path"
45132   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45133     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45134     new_path="$unix_path"
45135   fi
45136 
45137     # remove trailing .exe if any
45138     new_path="${new_path/%.exe/}"
45139 
45140     # Save the first 10 bytes of this path to the storage, so fixpath can work.
45141     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45142   fi
45143 
45144     else
45145       # We're on a unix platform. Hooray! :)
45146       # First separate the path from the arguments. This will split at the first
45147       # space.
45148       complete="$BUILD_CC"
45149       path="${complete%% *}"
45150       tmp="$complete EOL"
45151       arguments="${tmp#* }"
45152 
45153       # Cannot rely on the command "which" here since it doesn't always work.
45154       is_absolute_path=`$ECHO "$path" | $GREP ^/`
45155       if test -z "$is_absolute_path"; then
45156         # Path to executable is not absolute. Find it.
45157         IFS_save="$IFS"
45158         IFS=:
45159         for p in $PATH; do
45160           if test -f "$p/$path" && test -x "$p/$path"; then
45161             new_path="$p/$path"
45162             break
45163           fi
45164         done
45165         IFS="$IFS_save"
45166       else
45167         # This is an absolute path, we can use it without further modifications.
45168         new_path="$path"
45169       fi
45170 
45171       if test "x$new_path" = x; then
45172         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45173 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45174         has_space=`$ECHO "$complete" | $GREP " "`
45175         if test "x$has_space" != x; then
45176           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45177 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45178         fi
45179         as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45180       fi
45181     fi
45182 
45183     # Now join together the path and the arguments once again
45184     if test "x$arguments" != xEOL; then
45185       new_complete="$new_path ${arguments% *}"
45186     else
45187       new_complete="$new_path"
45188     fi
45189 
45190     if test "x$complete" != "x$new_complete"; then
45191       BUILD_CC="$new_complete"
45192       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
45193 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
45194     fi
45195   fi
45196 
45197 
45198 
45199 
45200   # Publish this variable in the help.
45201 
45202 
45203   if [ -z "${BUILD_CXX+x}" ]; then
45204     # The variable is not set by user, try to locate tool using the code snippet
45205     for ac_prog in cl CC g++
45206 do
45207   # Extract the first word of "$ac_prog", so it can be a program name with args.
45208 set dummy $ac_prog; ac_word=$2
45209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45210 $as_echo_n "checking for $ac_word... " >&6; }
45211 if ${ac_cv_path_BUILD_CXX+:} false; then :
45212   $as_echo_n "(cached) " >&6
45213 else
45214   case $BUILD_CXX in
45215   [\\/]* | ?:[\\/]*)
45216   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45217   ;;
45218   *)
45219   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45220 for as_dir in $PATH
45221 do
45222   IFS=$as_save_IFS
45223   test -z "$as_dir" && as_dir=.
45224     for ac_exec_ext in '' $ac_executable_extensions; do
45225   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45226     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45227     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45228     break 2
45229   fi
45230 done
45231   done
45232 IFS=$as_save_IFS
45233 
45234   ;;
45235 esac
45236 fi
45237 BUILD_CXX=$ac_cv_path_BUILD_CXX
45238 if test -n "$BUILD_CXX"; then
45239   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45240 $as_echo "$BUILD_CXX" >&6; }
45241 else
45242   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45243 $as_echo "no" >&6; }
45244 fi
45245 
45246 
45247   test -n "$BUILD_CXX" && break
45248 done
45249 
45250   else
45251     # The variable is set, but is it from the command line or the environment?
45252 
45253     # Try to remove the string !BUILD_CXX! from our list.
45254     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
45255     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45256       # If it failed, the variable was not from the command line. Ignore it,
45257       # but warn the user (except for BASH, which is always set by the calling BASH).
45258       if test "xBUILD_CXX" != xBASH; then
45259         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
45260 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
45261       fi
45262       # Try to locate tool using the code snippet
45263       for ac_prog in cl CC g++
45264 do
45265   # Extract the first word of "$ac_prog", so it can be a program name with args.
45266 set dummy $ac_prog; ac_word=$2
45267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45268 $as_echo_n "checking for $ac_word... " >&6; }
45269 if ${ac_cv_path_BUILD_CXX+:} false; then :
45270   $as_echo_n "(cached) " >&6
45271 else
45272   case $BUILD_CXX in
45273   [\\/]* | ?:[\\/]*)
45274   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45275   ;;
45276   *)
45277   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45278 for as_dir in $PATH
45279 do
45280   IFS=$as_save_IFS
45281   test -z "$as_dir" && as_dir=.
45282     for ac_exec_ext in '' $ac_executable_extensions; do
45283   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45284     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45285     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45286     break 2
45287   fi
45288 done
45289   done
45290 IFS=$as_save_IFS
45291 
45292   ;;
45293 esac
45294 fi
45295 BUILD_CXX=$ac_cv_path_BUILD_CXX
45296 if test -n "$BUILD_CXX"; then
45297   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45298 $as_echo "$BUILD_CXX" >&6; }
45299 else
45300   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45301 $as_echo "no" >&6; }
45302 fi
45303 
45304 
45305   test -n "$BUILD_CXX" && break
45306 done
45307 
45308     else
45309       # If it succeeded, then it was overridden by the user. We will use it
45310       # for the tool.
45311 
45312       # First remove it from the list of overridden variables, so we can test
45313       # for unknown variables in the end.
45314       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45315 
45316       # Check if we try to supply an empty value
45317       if test "x$BUILD_CXX" = x; then
45318         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
45319 $as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
45320         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
45321 $as_echo_n "checking for BUILD_CXX... " >&6; }
45322         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45323 $as_echo "disabled" >&6; }
45324       else
45325         # Check if the provided tool contains a complete path.
45326         tool_specified="$BUILD_CXX"
45327         tool_basename="${tool_specified##*/}"
45328         if test "x$tool_basename" = "x$tool_specified"; then
45329           # A command without a complete path is provided, search $PATH.
45330           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
45331 $as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
45332           # Extract the first word of "$tool_basename", so it can be a program name with args.
45333 set dummy $tool_basename; ac_word=$2
45334 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45335 $as_echo_n "checking for $ac_word... " >&6; }
45336 if ${ac_cv_path_BUILD_CXX+:} false; then :
45337   $as_echo_n "(cached) " >&6
45338 else
45339   case $BUILD_CXX in
45340   [\\/]* | ?:[\\/]*)
45341   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45342   ;;
45343   *)
45344   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45345 for as_dir in $PATH
45346 do
45347   IFS=$as_save_IFS
45348   test -z "$as_dir" && as_dir=.
45349     for ac_exec_ext in '' $ac_executable_extensions; do
45350   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45351     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45352     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45353     break 2
45354   fi
45355 done
45356   done
45357 IFS=$as_save_IFS
45358 
45359   ;;
45360 esac
45361 fi
45362 BUILD_CXX=$ac_cv_path_BUILD_CXX
45363 if test -n "$BUILD_CXX"; then
45364   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45365 $as_echo "$BUILD_CXX" >&6; }
45366 else
45367   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45368 $as_echo "no" >&6; }
45369 fi
45370 
45371 
45372           if test "x$BUILD_CXX" = x; then
45373             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45374           fi
45375         else
45376           # Otherwise we believe it is a complete path. Use it as it is.
45377           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
45378 $as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
45379           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
45380 $as_echo_n "checking for BUILD_CXX... " >&6; }
45381           if test ! -x "$tool_specified"; then
45382             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45383 $as_echo "not found" >&6; }
45384             as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
45385           fi
45386           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45387 $as_echo "$tool_specified" >&6; }
45388         fi
45389       fi
45390     fi
45391 
45392   fi
45393 
45394 
45395 
45396   if test "x$BUILD_CXX" = x; then
45397     as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
45398   fi
45399 
45400 
45401 
45402   # Only process if variable expands to non-empty
45403 
45404   if test "x$BUILD_CXX" != x; then
45405     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45406 
45407   # First separate the path from the arguments. This will split at the first
45408   # space.
45409   complete="$BUILD_CXX"
45410   path="${complete%% *}"
45411   tmp="$complete EOL"
45412   arguments="${tmp#* }"
45413 
45414   # Input might be given as Windows format, start by converting to
45415   # unix format.
45416   new_path=`$CYGPATH -u "$path"`
45417 
45418   # Now try to locate executable using which
45419   new_path=`$WHICH "$new_path" 2> /dev/null`
45420   # bat and cmd files are not always considered executable in cygwin causing which
45421   # to not find them
45422   if test "x$new_path" = x \
45423       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45424       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45425     new_path=`$CYGPATH -u "$path"`
45426   fi
45427   if test "x$new_path" = x; then
45428     # Oops. Which didn't find the executable.
45429     # The splitting of arguments from the executable at a space might have been incorrect,
45430     # since paths with space are more likely in Windows. Give it another try with the whole
45431     # argument.
45432     path="$complete"
45433     arguments="EOL"
45434     new_path=`$CYGPATH -u "$path"`
45435     new_path=`$WHICH "$new_path" 2> /dev/null`
45436     # bat and cmd files are not always considered executable in cygwin causing which
45437     # to not find them
45438     if test "x$new_path" = x \
45439         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45440         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45441       new_path=`$CYGPATH -u "$path"`
45442     fi
45443     if test "x$new_path" = x; then
45444       # It's still not found. Now this is an unrecoverable error.
45445       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45446 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45447       has_space=`$ECHO "$complete" | $GREP " "`
45448       if test "x$has_space" != x; then
45449         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45450 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45451       fi
45452       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45453     fi
45454   fi
45455 
45456   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45457   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45458   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45459   # "foo.exe" is OK but "foo" is an error.
45460   #
45461   # This test is therefore slightly more accurate than "test -f" to check for file presence.
45462   # It is also a way to make sure we got the proper file name for the real test later on.
45463   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45464   if test "x$test_shortpath" = x; then
45465     # Short path failed, file does not exist as specified.
45466     # Try adding .exe or .cmd
45467     if test -f "${new_path}.exe"; then
45468       input_to_shortpath="${new_path}.exe"
45469     elif test -f "${new_path}.cmd"; then
45470       input_to_shortpath="${new_path}.cmd"
45471     else
45472       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
45473 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
45474       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45475 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45476       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45477     fi
45478   else
45479     input_to_shortpath="$new_path"
45480   fi
45481 
45482   # Call helper function which possibly converts this using DOS-style short mode.
45483   # If so, the updated path is stored in $new_path.
45484   new_path="$input_to_shortpath"
45485 
45486   input_path="$input_to_shortpath"
45487   # Check if we need to convert this using DOS-style short mode. If the path
45488   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45489   # take no chances and rewrite it.
45490   # Note: m4 eats our [], so we need to use [ and ] instead.
45491   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45492   if test "x$has_forbidden_chars" != x; then
45493     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45494     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45495     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45496     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45497       # Going to short mode and back again did indeed matter. Since short mode is
45498       # case insensitive, let's make it lowercase to improve readability.
45499       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45500       # Now convert it back to Unix-style (cygpath)
45501       input_path=`$CYGPATH -u "$shortmode_path"`
45502       new_path="$input_path"
45503     fi
45504   fi
45505 
45506   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45507   if test "x$test_cygdrive_prefix" = x; then
45508     # As a simple fix, exclude /usr/bin since it's not a real path.
45509     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45510       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45511       # a path prefixed by /cygdrive for fixpath to work.
45512       new_path="$CYGWIN_ROOT_PATH$input_path"
45513     fi
45514   fi
45515 
45516   # remove trailing .exe if any
45517   new_path="${new_path/%.exe/}"
45518 
45519     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45520 
45521   # First separate the path from the arguments. This will split at the first
45522   # space.
45523   complete="$BUILD_CXX"
45524   path="${complete%% *}"
45525   tmp="$complete EOL"
45526   arguments="${tmp#* }"
45527 
45528   # Input might be given as Windows format, start by converting to
45529   # unix format.
45530   new_path="$path"
45531 
45532   windows_path="$new_path"
45533   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45534     unix_path=`$CYGPATH -u "$windows_path"`
45535     new_path="$unix_path"
45536   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45537     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45538     new_path="$unix_path"
45539   fi
45540 
45541 
45542   # Now try to locate executable using which
45543   new_path=`$WHICH "$new_path" 2> /dev/null`
45544 
45545   if test "x$new_path" = x; then
45546     # Oops. Which didn't find the executable.
45547     # The splitting of arguments from the executable at a space might have been incorrect,
45548     # since paths with space are more likely in Windows. Give it another try with the whole
45549     # argument.
45550     path="$complete"
45551     arguments="EOL"
45552     new_path="$path"
45553 
45554   windows_path="$new_path"
45555   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45556     unix_path=`$CYGPATH -u "$windows_path"`
45557     new_path="$unix_path"
45558   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45559     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45560     new_path="$unix_path"
45561   fi
45562 
45563 
45564     new_path=`$WHICH "$new_path" 2> /dev/null`
45565     # bat and cmd files are not always considered executable in MSYS causing which
45566     # to not find them
45567     if test "x$new_path" = x \
45568         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45569         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45570       new_path="$path"
45571 
45572   windows_path="$new_path"
45573   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45574     unix_path=`$CYGPATH -u "$windows_path"`
45575     new_path="$unix_path"
45576   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45577     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45578     new_path="$unix_path"
45579   fi
45580 
45581     fi
45582 
45583     if test "x$new_path" = x; then
45584       # It's still not found. Now this is an unrecoverable error.
45585       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45586 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45587       has_space=`$ECHO "$complete" | $GREP " "`
45588       if test "x$has_space" != x; then
45589         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45590 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45591       fi
45592       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45593     fi
45594   fi
45595 
45596   # Now new_path has a complete unix path to the binary
45597   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45598     # Keep paths in /bin as-is, but remove trailing .exe if any
45599     new_path="${new_path/%.exe/}"
45600     # Do not save /bin paths to all_fixpath_prefixes!
45601   else
45602     # Not in mixed or Windows style, start by that.
45603     new_path=`cmd //c echo $new_path`
45604 
45605   input_path="$new_path"
45606   # Check if we need to convert this using DOS-style short mode. If the path
45607   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45608   # take no chances and rewrite it.
45609   # Note: m4 eats our [], so we need to use [ and ] instead.
45610   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45611   if test "x$has_forbidden_chars" != x; then
45612     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45613     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45614   fi
45615 
45616     # Output is in $new_path
45617 
45618   windows_path="$new_path"
45619   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45620     unix_path=`$CYGPATH -u "$windows_path"`
45621     new_path="$unix_path"
45622   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45623     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45624     new_path="$unix_path"
45625   fi
45626 
45627     # remove trailing .exe if any
45628     new_path="${new_path/%.exe/}"
45629 
45630     # Save the first 10 bytes of this path to the storage, so fixpath can work.
45631     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45632   fi
45633 
45634     else
45635       # We're on a unix platform. Hooray! :)
45636       # First separate the path from the arguments. This will split at the first
45637       # space.
45638       complete="$BUILD_CXX"
45639       path="${complete%% *}"
45640       tmp="$complete EOL"
45641       arguments="${tmp#* }"
45642 
45643       # Cannot rely on the command "which" here since it doesn't always work.
45644       is_absolute_path=`$ECHO "$path" | $GREP ^/`
45645       if test -z "$is_absolute_path"; then
45646         # Path to executable is not absolute. Find it.
45647         IFS_save="$IFS"
45648         IFS=:
45649         for p in $PATH; do
45650           if test -f "$p/$path" && test -x "$p/$path"; then
45651             new_path="$p/$path"
45652             break
45653           fi
45654         done
45655         IFS="$IFS_save"
45656       else
45657         # This is an absolute path, we can use it without further modifications.
45658         new_path="$path"
45659       fi
45660 
45661       if test "x$new_path" = x; then
45662         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45663 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45664         has_space=`$ECHO "$complete" | $GREP " "`
45665         if test "x$has_space" != x; then
45666           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45667 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45668         fi
45669         as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45670       fi
45671     fi
45672 
45673     # Now join together the path and the arguments once again
45674     if test "x$arguments" != xEOL; then
45675       new_complete="$new_path ${arguments% *}"
45676     else
45677       new_complete="$new_path"
45678     fi
45679 
45680     if test "x$complete" != "x$new_complete"; then
45681       BUILD_CXX="$new_complete"
45682       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
45683 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
45684     fi
45685   fi
45686 
45687 
45688 
45689   # Publish this variable in the help.
45690 
45691 
45692   if [ -z "${BUILD_NM+x}" ]; then
45693     # The variable is not set by user, try to locate tool using the code snippet
45694     for ac_prog in nm gcc-nm
45695 do
45696   # Extract the first word of "$ac_prog", so it can be a program name with args.
45697 set dummy $ac_prog; ac_word=$2
45698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45699 $as_echo_n "checking for $ac_word... " >&6; }
45700 if ${ac_cv_path_BUILD_NM+:} false; then :
45701   $as_echo_n "(cached) " >&6
45702 else
45703   case $BUILD_NM in
45704   [\\/]* | ?:[\\/]*)
45705   ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45706   ;;
45707   *)
45708   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45709 for as_dir in $PATH
45710 do
45711   IFS=$as_save_IFS
45712   test -z "$as_dir" && as_dir=.
45713     for ac_exec_ext in '' $ac_executable_extensions; do
45714   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45715     ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45716     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45717     break 2
45718   fi
45719 done
45720   done
45721 IFS=$as_save_IFS
45722 
45723   ;;
45724 esac
45725 fi
45726 BUILD_NM=$ac_cv_path_BUILD_NM
45727 if test -n "$BUILD_NM"; then
45728   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45729 $as_echo "$BUILD_NM" >&6; }
45730 else
45731   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45732 $as_echo "no" >&6; }
45733 fi
45734 
45735 
45736   test -n "$BUILD_NM" && break
45737 done
45738 
45739   else
45740     # The variable is set, but is it from the command line or the environment?
45741 
45742     # Try to remove the string !BUILD_NM! from our list.
45743     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
45744     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45745       # If it failed, the variable was not from the command line. Ignore it,
45746       # but warn the user (except for BASH, which is always set by the calling BASH).
45747       if test "xBUILD_NM" != xBASH; then
45748         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
45749 $as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
45750       fi
45751       # Try to locate tool using the code snippet
45752       for ac_prog in nm gcc-nm
45753 do
45754   # Extract the first word of "$ac_prog", so it can be a program name with args.
45755 set dummy $ac_prog; ac_word=$2
45756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45757 $as_echo_n "checking for $ac_word... " >&6; }
45758 if ${ac_cv_path_BUILD_NM+:} false; then :
45759   $as_echo_n "(cached) " >&6
45760 else
45761   case $BUILD_NM in
45762   [\\/]* | ?:[\\/]*)
45763   ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45764   ;;
45765   *)
45766   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45767 for as_dir in $PATH
45768 do
45769   IFS=$as_save_IFS
45770   test -z "$as_dir" && as_dir=.
45771     for ac_exec_ext in '' $ac_executable_extensions; do
45772   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45773     ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45774     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45775     break 2
45776   fi
45777 done
45778   done
45779 IFS=$as_save_IFS
45780 
45781   ;;
45782 esac
45783 fi
45784 BUILD_NM=$ac_cv_path_BUILD_NM
45785 if test -n "$BUILD_NM"; then
45786   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45787 $as_echo "$BUILD_NM" >&6; }
45788 else
45789   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45790 $as_echo "no" >&6; }
45791 fi
45792 
45793 
45794   test -n "$BUILD_NM" && break
45795 done
45796 
45797     else
45798       # If it succeeded, then it was overridden by the user. We will use it
45799       # for the tool.
45800 
45801       # First remove it from the list of overridden variables, so we can test
45802       # for unknown variables in the end.
45803       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45804 
45805       # Check if we try to supply an empty value
45806       if test "x$BUILD_NM" = x; then
45807         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
45808 $as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
45809         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45810 $as_echo_n "checking for BUILD_NM... " >&6; }
45811         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45812 $as_echo "disabled" >&6; }
45813       else
45814         # Check if the provided tool contains a complete path.
45815         tool_specified="$BUILD_NM"
45816         tool_basename="${tool_specified##*/}"
45817         if test "x$tool_basename" = "x$tool_specified"; then
45818           # A command without a complete path is provided, search $PATH.
45819           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
45820 $as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
45821           # Extract the first word of "$tool_basename", so it can be a program name with args.
45822 set dummy $tool_basename; ac_word=$2
45823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45824 $as_echo_n "checking for $ac_word... " >&6; }
45825 if ${ac_cv_path_BUILD_NM+:} false; then :
45826   $as_echo_n "(cached) " >&6
45827 else
45828   case $BUILD_NM in
45829   [\\/]* | ?:[\\/]*)
45830   ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45831   ;;
45832   *)
45833   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45834 for as_dir in $PATH
45835 do
45836   IFS=$as_save_IFS
45837   test -z "$as_dir" && as_dir=.
45838     for ac_exec_ext in '' $ac_executable_extensions; do
45839   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45840     ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45841     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45842     break 2
45843   fi
45844 done
45845   done
45846 IFS=$as_save_IFS
45847 
45848   ;;
45849 esac
45850 fi
45851 BUILD_NM=$ac_cv_path_BUILD_NM
45852 if test -n "$BUILD_NM"; then
45853   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45854 $as_echo "$BUILD_NM" >&6; }
45855 else
45856   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45857 $as_echo "no" >&6; }
45858 fi
45859 
45860 
45861           if test "x$BUILD_NM" = x; then
45862             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45863           fi
45864         else
45865           # Otherwise we believe it is a complete path. Use it as it is.
45866           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
45867 $as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
45868           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45869 $as_echo_n "checking for BUILD_NM... " >&6; }
45870           if test ! -x "$tool_specified"; then
45871             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45872 $as_echo "not found" >&6; }
45873             as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
45874           fi
45875           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45876 $as_echo "$tool_specified" >&6; }
45877         fi
45878       fi
45879     fi
45880 
45881   fi
45882 
45883 
45884 
45885   # Only process if variable expands to non-empty
45886 
45887   if test "x$BUILD_NM" != x; then
45888     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45889 
45890   # First separate the path from the arguments. This will split at the first
45891   # space.
45892   complete="$BUILD_NM"
45893   path="${complete%% *}"
45894   tmp="$complete EOL"
45895   arguments="${tmp#* }"
45896 
45897   # Input might be given as Windows format, start by converting to
45898   # unix format.
45899   new_path=`$CYGPATH -u "$path"`
45900 
45901   # Now try to locate executable using which
45902   new_path=`$WHICH "$new_path" 2> /dev/null`
45903   # bat and cmd files are not always considered executable in cygwin causing which
45904   # to not find them
45905   if test "x$new_path" = x \
45906       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45907       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45908     new_path=`$CYGPATH -u "$path"`
45909   fi
45910   if test "x$new_path" = x; then
45911     # Oops. Which didn't find the executable.
45912     # The splitting of arguments from the executable at a space might have been incorrect,
45913     # since paths with space are more likely in Windows. Give it another try with the whole
45914     # argument.
45915     path="$complete"
45916     arguments="EOL"
45917     new_path=`$CYGPATH -u "$path"`
45918     new_path=`$WHICH "$new_path" 2> /dev/null`
45919     # bat and cmd files are not always considered executable in cygwin causing which
45920     # to not find them
45921     if test "x$new_path" = x \
45922         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45923         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45924       new_path=`$CYGPATH -u "$path"`
45925     fi
45926     if test "x$new_path" = x; then
45927       # It's still not found. Now this is an unrecoverable error.
45928       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45929 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45930       has_space=`$ECHO "$complete" | $GREP " "`
45931       if test "x$has_space" != x; then
45932         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45933 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45934       fi
45935       as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45936     fi
45937   fi
45938 
45939   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45940   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45941   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45942   # "foo.exe" is OK but "foo" is an error.
45943   #
45944   # This test is therefore slightly more accurate than "test -f" to check for file presence.
45945   # It is also a way to make sure we got the proper file name for the real test later on.
45946   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45947   if test "x$test_shortpath" = x; then
45948     # Short path failed, file does not exist as specified.
45949     # Try adding .exe or .cmd
45950     if test -f "${new_path}.exe"; then
45951       input_to_shortpath="${new_path}.exe"
45952     elif test -f "${new_path}.cmd"; then
45953       input_to_shortpath="${new_path}.cmd"
45954     else
45955       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
45956 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
45957       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45958 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45959       as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45960     fi
45961   else
45962     input_to_shortpath="$new_path"
45963   fi
45964 
45965   # Call helper function which possibly converts this using DOS-style short mode.
45966   # If so, the updated path is stored in $new_path.
45967   new_path="$input_to_shortpath"
45968 
45969   input_path="$input_to_shortpath"
45970   # Check if we need to convert this using DOS-style short mode. If the path
45971   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45972   # take no chances and rewrite it.
45973   # Note: m4 eats our [], so we need to use [ and ] instead.
45974   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45975   if test "x$has_forbidden_chars" != x; then
45976     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45977     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45978     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45979     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45980       # Going to short mode and back again did indeed matter. Since short mode is
45981       # case insensitive, let's make it lowercase to improve readability.
45982       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45983       # Now convert it back to Unix-style (cygpath)
45984       input_path=`$CYGPATH -u "$shortmode_path"`
45985       new_path="$input_path"
45986     fi
45987   fi
45988 
45989   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45990   if test "x$test_cygdrive_prefix" = x; then
45991     # As a simple fix, exclude /usr/bin since it's not a real path.
45992     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45993       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45994       # a path prefixed by /cygdrive for fixpath to work.
45995       new_path="$CYGWIN_ROOT_PATH$input_path"
45996     fi
45997   fi
45998 
45999   # remove trailing .exe if any
46000   new_path="${new_path/%.exe/}"
46001 
46002     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46003 
46004   # First separate the path from the arguments. This will split at the first
46005   # space.
46006   complete="$BUILD_NM"
46007   path="${complete%% *}"
46008   tmp="$complete EOL"
46009   arguments="${tmp#* }"
46010 
46011   # Input might be given as Windows format, start by converting to
46012   # unix format.
46013   new_path="$path"
46014 
46015   windows_path="$new_path"
46016   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46017     unix_path=`$CYGPATH -u "$windows_path"`
46018     new_path="$unix_path"
46019   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46020     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46021     new_path="$unix_path"
46022   fi
46023 
46024 
46025   # Now try to locate executable using which
46026   new_path=`$WHICH "$new_path" 2> /dev/null`
46027 
46028   if test "x$new_path" = x; then
46029     # Oops. Which didn't find the executable.
46030     # The splitting of arguments from the executable at a space might have been incorrect,
46031     # since paths with space are more likely in Windows. Give it another try with the whole
46032     # argument.
46033     path="$complete"
46034     arguments="EOL"
46035     new_path="$path"
46036 
46037   windows_path="$new_path"
46038   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46039     unix_path=`$CYGPATH -u "$windows_path"`
46040     new_path="$unix_path"
46041   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46042     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46043     new_path="$unix_path"
46044   fi
46045 
46046 
46047     new_path=`$WHICH "$new_path" 2> /dev/null`
46048     # bat and cmd files are not always considered executable in MSYS causing which
46049     # to not find them
46050     if test "x$new_path" = x \
46051         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46052         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46053       new_path="$path"
46054 
46055   windows_path="$new_path"
46056   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46057     unix_path=`$CYGPATH -u "$windows_path"`
46058     new_path="$unix_path"
46059   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46060     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46061     new_path="$unix_path"
46062   fi
46063 
46064     fi
46065 
46066     if test "x$new_path" = x; then
46067       # It's still not found. Now this is an unrecoverable error.
46068       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46069 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46070       has_space=`$ECHO "$complete" | $GREP " "`
46071       if test "x$has_space" != x; then
46072         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46073 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46074       fi
46075       as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46076     fi
46077   fi
46078 
46079   # Now new_path has a complete unix path to the binary
46080   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46081     # Keep paths in /bin as-is, but remove trailing .exe if any
46082     new_path="${new_path/%.exe/}"
46083     # Do not save /bin paths to all_fixpath_prefixes!
46084   else
46085     # Not in mixed or Windows style, start by that.
46086     new_path=`cmd //c echo $new_path`
46087 
46088   input_path="$new_path"
46089   # Check if we need to convert this using DOS-style short mode. If the path
46090   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46091   # take no chances and rewrite it.
46092   # Note: m4 eats our [], so we need to use [ and ] instead.
46093   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46094   if test "x$has_forbidden_chars" != x; then
46095     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46096     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46097   fi
46098 
46099     # Output is in $new_path
46100 
46101   windows_path="$new_path"
46102   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46103     unix_path=`$CYGPATH -u "$windows_path"`
46104     new_path="$unix_path"
46105   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46106     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46107     new_path="$unix_path"
46108   fi
46109 
46110     # remove trailing .exe if any
46111     new_path="${new_path/%.exe/}"
46112 
46113     # Save the first 10 bytes of this path to the storage, so fixpath can work.
46114     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46115   fi
46116 
46117     else
46118       # We're on a unix platform. Hooray! :)
46119       # First separate the path from the arguments. This will split at the first
46120       # space.
46121       complete="$BUILD_NM"
46122       path="${complete%% *}"
46123       tmp="$complete EOL"
46124       arguments="${tmp#* }"
46125 
46126       # Cannot rely on the command "which" here since it doesn't always work.
46127       is_absolute_path=`$ECHO "$path" | $GREP ^/`
46128       if test -z "$is_absolute_path"; then
46129         # Path to executable is not absolute. Find it.
46130         IFS_save="$IFS"
46131         IFS=:
46132         for p in $PATH; do
46133           if test -f "$p/$path" && test -x "$p/$path"; then
46134             new_path="$p/$path"
46135             break
46136           fi
46137         done
46138         IFS="$IFS_save"
46139       else
46140         # This is an absolute path, we can use it without further modifications.
46141         new_path="$path"
46142       fi
46143 
46144       if test "x$new_path" = x; then
46145         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46146 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46147         has_space=`$ECHO "$complete" | $GREP " "`
46148         if test "x$has_space" != x; then
46149           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46150 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46151         fi
46152         as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46153       fi
46154     fi
46155 
46156     # Now join together the path and the arguments once again
46157     if test "x$arguments" != xEOL; then
46158       new_complete="$new_path ${arguments% *}"
46159     else
46160       new_complete="$new_path"
46161     fi
46162 
46163     if test "x$complete" != "x$new_complete"; then
46164       BUILD_NM="$new_complete"
46165       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
46166 $as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
46167     fi
46168   fi
46169 
46170 
46171 
46172   # Publish this variable in the help.
46173 
46174 
46175   if [ -z "${BUILD_AR+x}" ]; then
46176     # The variable is not set by user, try to locate tool using the code snippet
46177     for ac_prog in ar gcc-ar
46178 do
46179   # Extract the first word of "$ac_prog", so it can be a program name with args.
46180 set dummy $ac_prog; ac_word=$2
46181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46182 $as_echo_n "checking for $ac_word... " >&6; }
46183 if ${ac_cv_path_BUILD_AR+:} false; then :
46184   $as_echo_n "(cached) " >&6
46185 else
46186   case $BUILD_AR in
46187   [\\/]* | ?:[\\/]*)
46188   ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46189   ;;
46190   *)
46191   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46192 for as_dir in $PATH
46193 do
46194   IFS=$as_save_IFS
46195   test -z "$as_dir" && as_dir=.
46196     for ac_exec_ext in '' $ac_executable_extensions; do
46197   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46198     ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46199     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46200     break 2
46201   fi
46202 done
46203   done
46204 IFS=$as_save_IFS
46205 
46206   ;;
46207 esac
46208 fi
46209 BUILD_AR=$ac_cv_path_BUILD_AR
46210 if test -n "$BUILD_AR"; then
46211   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46212 $as_echo "$BUILD_AR" >&6; }
46213 else
46214   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46215 $as_echo "no" >&6; }
46216 fi
46217 
46218 
46219   test -n "$BUILD_AR" && break
46220 done
46221 
46222   else
46223     # The variable is set, but is it from the command line or the environment?
46224 
46225     # Try to remove the string !BUILD_AR! from our list.
46226     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
46227     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46228       # If it failed, the variable was not from the command line. Ignore it,
46229       # but warn the user (except for BASH, which is always set by the calling BASH).
46230       if test "xBUILD_AR" != xBASH; then
46231         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
46232 $as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
46233       fi
46234       # Try to locate tool using the code snippet
46235       for ac_prog in ar gcc-ar
46236 do
46237   # Extract the first word of "$ac_prog", so it can be a program name with args.
46238 set dummy $ac_prog; ac_word=$2
46239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46240 $as_echo_n "checking for $ac_word... " >&6; }
46241 if ${ac_cv_path_BUILD_AR+:} false; then :
46242   $as_echo_n "(cached) " >&6
46243 else
46244   case $BUILD_AR in
46245   [\\/]* | ?:[\\/]*)
46246   ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46247   ;;
46248   *)
46249   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46250 for as_dir in $PATH
46251 do
46252   IFS=$as_save_IFS
46253   test -z "$as_dir" && as_dir=.
46254     for ac_exec_ext in '' $ac_executable_extensions; do
46255   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46256     ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46257     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46258     break 2
46259   fi
46260 done
46261   done
46262 IFS=$as_save_IFS
46263 
46264   ;;
46265 esac
46266 fi
46267 BUILD_AR=$ac_cv_path_BUILD_AR
46268 if test -n "$BUILD_AR"; then
46269   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46270 $as_echo "$BUILD_AR" >&6; }
46271 else
46272   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46273 $as_echo "no" >&6; }
46274 fi
46275 
46276 
46277   test -n "$BUILD_AR" && break
46278 done
46279 
46280     else
46281       # If it succeeded, then it was overridden by the user. We will use it
46282       # for the tool.
46283 
46284       # First remove it from the list of overridden variables, so we can test
46285       # for unknown variables in the end.
46286       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46287 
46288       # Check if we try to supply an empty value
46289       if test "x$BUILD_AR" = x; then
46290         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
46291 $as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
46292         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
46293 $as_echo_n "checking for BUILD_AR... " >&6; }
46294         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46295 $as_echo "disabled" >&6; }
46296       else
46297         # Check if the provided tool contains a complete path.
46298         tool_specified="$BUILD_AR"
46299         tool_basename="${tool_specified##*/}"
46300         if test "x$tool_basename" = "x$tool_specified"; then
46301           # A command without a complete path is provided, search $PATH.
46302           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
46303 $as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
46304           # Extract the first word of "$tool_basename", so it can be a program name with args.
46305 set dummy $tool_basename; ac_word=$2
46306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46307 $as_echo_n "checking for $ac_word... " >&6; }
46308 if ${ac_cv_path_BUILD_AR+:} false; then :
46309   $as_echo_n "(cached) " >&6
46310 else
46311   case $BUILD_AR in
46312   [\\/]* | ?:[\\/]*)
46313   ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46314   ;;
46315   *)
46316   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46317 for as_dir in $PATH
46318 do
46319   IFS=$as_save_IFS
46320   test -z "$as_dir" && as_dir=.
46321     for ac_exec_ext in '' $ac_executable_extensions; do
46322   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46323     ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46324     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46325     break 2
46326   fi
46327 done
46328   done
46329 IFS=$as_save_IFS
46330 
46331   ;;
46332 esac
46333 fi
46334 BUILD_AR=$ac_cv_path_BUILD_AR
46335 if test -n "$BUILD_AR"; then
46336   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46337 $as_echo "$BUILD_AR" >&6; }
46338 else
46339   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46340 $as_echo "no" >&6; }
46341 fi
46342 
46343 
46344           if test "x$BUILD_AR" = x; then
46345             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46346           fi
46347         else
46348           # Otherwise we believe it is a complete path. Use it as it is.
46349           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
46350 $as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
46351           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
46352 $as_echo_n "checking for BUILD_AR... " >&6; }
46353           if test ! -x "$tool_specified"; then
46354             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46355 $as_echo "not found" >&6; }
46356             as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
46357           fi
46358           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46359 $as_echo "$tool_specified" >&6; }
46360         fi
46361       fi
46362     fi
46363 
46364   fi
46365 
46366 
46367 
46368   # Only process if variable expands to non-empty
46369 
46370   if test "x$BUILD_AR" != x; then
46371     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46372 
46373   # First separate the path from the arguments. This will split at the first
46374   # space.
46375   complete="$BUILD_AR"
46376   path="${complete%% *}"
46377   tmp="$complete EOL"
46378   arguments="${tmp#* }"
46379 
46380   # Input might be given as Windows format, start by converting to
46381   # unix format.
46382   new_path=`$CYGPATH -u "$path"`
46383 
46384   # Now try to locate executable using which
46385   new_path=`$WHICH "$new_path" 2> /dev/null`
46386   # bat and cmd files are not always considered executable in cygwin causing which
46387   # to not find them
46388   if test "x$new_path" = x \
46389       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46390       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46391     new_path=`$CYGPATH -u "$path"`
46392   fi
46393   if test "x$new_path" = x; then
46394     # Oops. Which didn't find the executable.
46395     # The splitting of arguments from the executable at a space might have been incorrect,
46396     # since paths with space are more likely in Windows. Give it another try with the whole
46397     # argument.
46398     path="$complete"
46399     arguments="EOL"
46400     new_path=`$CYGPATH -u "$path"`
46401     new_path=`$WHICH "$new_path" 2> /dev/null`
46402     # bat and cmd files are not always considered executable in cygwin causing which
46403     # to not find them
46404     if test "x$new_path" = x \
46405         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46406         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46407       new_path=`$CYGPATH -u "$path"`
46408     fi
46409     if test "x$new_path" = x; then
46410       # It's still not found. Now this is an unrecoverable error.
46411       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46412 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46413       has_space=`$ECHO "$complete" | $GREP " "`
46414       if test "x$has_space" != x; then
46415         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46416 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46417       fi
46418       as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46419     fi
46420   fi
46421 
46422   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46423   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46424   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46425   # "foo.exe" is OK but "foo" is an error.
46426   #
46427   # This test is therefore slightly more accurate than "test -f" to check for file presence.
46428   # It is also a way to make sure we got the proper file name for the real test later on.
46429   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46430   if test "x$test_shortpath" = x; then
46431     # Short path failed, file does not exist as specified.
46432     # Try adding .exe or .cmd
46433     if test -f "${new_path}.exe"; then
46434       input_to_shortpath="${new_path}.exe"
46435     elif test -f "${new_path}.cmd"; then
46436       input_to_shortpath="${new_path}.cmd"
46437     else
46438       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
46439 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
46440       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46441 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46442       as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46443     fi
46444   else
46445     input_to_shortpath="$new_path"
46446   fi
46447 
46448   # Call helper function which possibly converts this using DOS-style short mode.
46449   # If so, the updated path is stored in $new_path.
46450   new_path="$input_to_shortpath"
46451 
46452   input_path="$input_to_shortpath"
46453   # Check if we need to convert this using DOS-style short mode. If the path
46454   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46455   # take no chances and rewrite it.
46456   # Note: m4 eats our [], so we need to use [ and ] instead.
46457   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46458   if test "x$has_forbidden_chars" != x; then
46459     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46460     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46461     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46462     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46463       # Going to short mode and back again did indeed matter. Since short mode is
46464       # case insensitive, let's make it lowercase to improve readability.
46465       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46466       # Now convert it back to Unix-style (cygpath)
46467       input_path=`$CYGPATH -u "$shortmode_path"`
46468       new_path="$input_path"
46469     fi
46470   fi
46471 
46472   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46473   if test "x$test_cygdrive_prefix" = x; then
46474     # As a simple fix, exclude /usr/bin since it's not a real path.
46475     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46476       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46477       # a path prefixed by /cygdrive for fixpath to work.
46478       new_path="$CYGWIN_ROOT_PATH$input_path"
46479     fi
46480   fi
46481 
46482   # remove trailing .exe if any
46483   new_path="${new_path/%.exe/}"
46484 
46485     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46486 
46487   # First separate the path from the arguments. This will split at the first
46488   # space.
46489   complete="$BUILD_AR"
46490   path="${complete%% *}"
46491   tmp="$complete EOL"
46492   arguments="${tmp#* }"
46493 
46494   # Input might be given as Windows format, start by converting to
46495   # unix format.
46496   new_path="$path"
46497 
46498   windows_path="$new_path"
46499   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46500     unix_path=`$CYGPATH -u "$windows_path"`
46501     new_path="$unix_path"
46502   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46503     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46504     new_path="$unix_path"
46505   fi
46506 
46507 
46508   # Now try to locate executable using which
46509   new_path=`$WHICH "$new_path" 2> /dev/null`
46510 
46511   if test "x$new_path" = x; then
46512     # Oops. Which didn't find the executable.
46513     # The splitting of arguments from the executable at a space might have been incorrect,
46514     # since paths with space are more likely in Windows. Give it another try with the whole
46515     # argument.
46516     path="$complete"
46517     arguments="EOL"
46518     new_path="$path"
46519 
46520   windows_path="$new_path"
46521   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46522     unix_path=`$CYGPATH -u "$windows_path"`
46523     new_path="$unix_path"
46524   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46525     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46526     new_path="$unix_path"
46527   fi
46528 
46529 
46530     new_path=`$WHICH "$new_path" 2> /dev/null`
46531     # bat and cmd files are not always considered executable in MSYS causing which
46532     # to not find them
46533     if test "x$new_path" = x \
46534         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46535         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46536       new_path="$path"
46537 
46538   windows_path="$new_path"
46539   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46540     unix_path=`$CYGPATH -u "$windows_path"`
46541     new_path="$unix_path"
46542   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46543     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46544     new_path="$unix_path"
46545   fi
46546 
46547     fi
46548 
46549     if test "x$new_path" = x; then
46550       # It's still not found. Now this is an unrecoverable error.
46551       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46552 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46553       has_space=`$ECHO "$complete" | $GREP " "`
46554       if test "x$has_space" != x; then
46555         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46556 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46557       fi
46558       as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46559     fi
46560   fi
46561 
46562   # Now new_path has a complete unix path to the binary
46563   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46564     # Keep paths in /bin as-is, but remove trailing .exe if any
46565     new_path="${new_path/%.exe/}"
46566     # Do not save /bin paths to all_fixpath_prefixes!
46567   else
46568     # Not in mixed or Windows style, start by that.
46569     new_path=`cmd //c echo $new_path`
46570 
46571   input_path="$new_path"
46572   # Check if we need to convert this using DOS-style short mode. If the path
46573   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46574   # take no chances and rewrite it.
46575   # Note: m4 eats our [], so we need to use [ and ] instead.
46576   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46577   if test "x$has_forbidden_chars" != x; then
46578     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46579     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46580   fi
46581 
46582     # Output is in $new_path
46583 
46584   windows_path="$new_path"
46585   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46586     unix_path=`$CYGPATH -u "$windows_path"`
46587     new_path="$unix_path"
46588   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46589     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46590     new_path="$unix_path"
46591   fi
46592 
46593     # remove trailing .exe if any
46594     new_path="${new_path/%.exe/}"
46595 
46596     # Save the first 10 bytes of this path to the storage, so fixpath can work.
46597     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46598   fi
46599 
46600     else
46601       # We're on a unix platform. Hooray! :)
46602       # First separate the path from the arguments. This will split at the first
46603       # space.
46604       complete="$BUILD_AR"
46605       path="${complete%% *}"
46606       tmp="$complete EOL"
46607       arguments="${tmp#* }"
46608 
46609       # Cannot rely on the command "which" here since it doesn't always work.
46610       is_absolute_path=`$ECHO "$path" | $GREP ^/`
46611       if test -z "$is_absolute_path"; then
46612         # Path to executable is not absolute. Find it.
46613         IFS_save="$IFS"
46614         IFS=:
46615         for p in $PATH; do
46616           if test -f "$p/$path" && test -x "$p/$path"; then
46617             new_path="$p/$path"
46618             break
46619           fi
46620         done
46621         IFS="$IFS_save"
46622       else
46623         # This is an absolute path, we can use it without further modifications.
46624         new_path="$path"
46625       fi
46626 
46627       if test "x$new_path" = x; then
46628         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46629 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46630         has_space=`$ECHO "$complete" | $GREP " "`
46631         if test "x$has_space" != x; then
46632           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46633 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46634         fi
46635         as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46636       fi
46637     fi
46638 
46639     # Now join together the path and the arguments once again
46640     if test "x$arguments" != xEOL; then
46641       new_complete="$new_path ${arguments% *}"
46642     else
46643       new_complete="$new_path"
46644     fi
46645 
46646     if test "x$complete" != "x$new_complete"; then
46647       BUILD_AR="$new_complete"
46648       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
46649 $as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
46650     fi
46651   fi
46652 
46653 
46654 
46655   # Publish this variable in the help.
46656 
46657 
46658   if [ -z "${BUILD_OBJCOPY+x}" ]; then
46659     # The variable is not set by user, try to locate tool using the code snippet
46660     for ac_prog in objcopy
46661 do
46662   # Extract the first word of "$ac_prog", so it can be a program name with args.
46663 set dummy $ac_prog; ac_word=$2
46664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46665 $as_echo_n "checking for $ac_word... " >&6; }
46666 if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46667   $as_echo_n "(cached) " >&6
46668 else
46669   case $BUILD_OBJCOPY in
46670   [\\/]* | ?:[\\/]*)
46671   ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46672   ;;
46673   *)
46674   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46675 for as_dir in $PATH
46676 do
46677   IFS=$as_save_IFS
46678   test -z "$as_dir" && as_dir=.
46679     for ac_exec_ext in '' $ac_executable_extensions; do
46680   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46681     ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46682     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46683     break 2
46684   fi
46685 done
46686   done
46687 IFS=$as_save_IFS
46688 
46689   ;;
46690 esac
46691 fi
46692 BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46693 if test -n "$BUILD_OBJCOPY"; then
46694   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46695 $as_echo "$BUILD_OBJCOPY" >&6; }
46696 else
46697   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46698 $as_echo "no" >&6; }
46699 fi
46700 
46701 
46702   test -n "$BUILD_OBJCOPY" && break
46703 done
46704 
46705   else
46706     # The variable is set, but is it from the command line or the environment?
46707 
46708     # Try to remove the string !BUILD_OBJCOPY! from our list.
46709     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
46710     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46711       # If it failed, the variable was not from the command line. Ignore it,
46712       # but warn the user (except for BASH, which is always set by the calling BASH).
46713       if test "xBUILD_OBJCOPY" != xBASH; then
46714         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
46715 $as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
46716       fi
46717       # Try to locate tool using the code snippet
46718       for ac_prog in objcopy
46719 do
46720   # Extract the first word of "$ac_prog", so it can be a program name with args.
46721 set dummy $ac_prog; ac_word=$2
46722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46723 $as_echo_n "checking for $ac_word... " >&6; }
46724 if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46725   $as_echo_n "(cached) " >&6
46726 else
46727   case $BUILD_OBJCOPY in
46728   [\\/]* | ?:[\\/]*)
46729   ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46730   ;;
46731   *)
46732   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46733 for as_dir in $PATH
46734 do
46735   IFS=$as_save_IFS
46736   test -z "$as_dir" && as_dir=.
46737     for ac_exec_ext in '' $ac_executable_extensions; do
46738   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46739     ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46740     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46741     break 2
46742   fi
46743 done
46744   done
46745 IFS=$as_save_IFS
46746 
46747   ;;
46748 esac
46749 fi
46750 BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46751 if test -n "$BUILD_OBJCOPY"; then
46752   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46753 $as_echo "$BUILD_OBJCOPY" >&6; }
46754 else
46755   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46756 $as_echo "no" >&6; }
46757 fi
46758 
46759 
46760   test -n "$BUILD_OBJCOPY" && break
46761 done
46762 
46763     else
46764       # If it succeeded, then it was overridden by the user. We will use it
46765       # for the tool.
46766 
46767       # First remove it from the list of overridden variables, so we can test
46768       # for unknown variables in the end.
46769       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46770 
46771       # Check if we try to supply an empty value
46772       if test "x$BUILD_OBJCOPY" = x; then
46773         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
46774 $as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
46775         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46776 $as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46777         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46778 $as_echo "disabled" >&6; }
46779       else
46780         # Check if the provided tool contains a complete path.
46781         tool_specified="$BUILD_OBJCOPY"
46782         tool_basename="${tool_specified##*/}"
46783         if test "x$tool_basename" = "x$tool_specified"; then
46784           # A command without a complete path is provided, search $PATH.
46785           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
46786 $as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
46787           # Extract the first word of "$tool_basename", so it can be a program name with args.
46788 set dummy $tool_basename; ac_word=$2
46789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46790 $as_echo_n "checking for $ac_word... " >&6; }
46791 if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46792   $as_echo_n "(cached) " >&6
46793 else
46794   case $BUILD_OBJCOPY in
46795   [\\/]* | ?:[\\/]*)
46796   ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46797   ;;
46798   *)
46799   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46800 for as_dir in $PATH
46801 do
46802   IFS=$as_save_IFS
46803   test -z "$as_dir" && as_dir=.
46804     for ac_exec_ext in '' $ac_executable_extensions; do
46805   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46806     ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46807     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46808     break 2
46809   fi
46810 done
46811   done
46812 IFS=$as_save_IFS
46813 
46814   ;;
46815 esac
46816 fi
46817 BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46818 if test -n "$BUILD_OBJCOPY"; then
46819   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46820 $as_echo "$BUILD_OBJCOPY" >&6; }
46821 else
46822   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46823 $as_echo "no" >&6; }
46824 fi
46825 
46826 
46827           if test "x$BUILD_OBJCOPY" = x; then
46828             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46829           fi
46830         else
46831           # Otherwise we believe it is a complete path. Use it as it is.
46832           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
46833 $as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
46834           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46835 $as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46836           if test ! -x "$tool_specified"; then
46837             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46838 $as_echo "not found" >&6; }
46839             as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
46840           fi
46841           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46842 $as_echo "$tool_specified" >&6; }
46843         fi
46844       fi
46845     fi
46846 
46847   fi
46848 
46849 
46850 
46851   # Only process if variable expands to non-empty
46852 
46853   if test "x$BUILD_OBJCOPY" != x; then
46854     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46855 
46856   # First separate the path from the arguments. This will split at the first
46857   # space.
46858   complete="$BUILD_OBJCOPY"
46859   path="${complete%% *}"
46860   tmp="$complete EOL"
46861   arguments="${tmp#* }"
46862 
46863   # Input might be given as Windows format, start by converting to
46864   # unix format.
46865   new_path=`$CYGPATH -u "$path"`
46866 
46867   # Now try to locate executable using which
46868   new_path=`$WHICH "$new_path" 2> /dev/null`
46869   # bat and cmd files are not always considered executable in cygwin causing which
46870   # to not find them
46871   if test "x$new_path" = x \
46872       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46873       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46874     new_path=`$CYGPATH -u "$path"`
46875   fi
46876   if test "x$new_path" = x; then
46877     # Oops. Which didn't find the executable.
46878     # The splitting of arguments from the executable at a space might have been incorrect,
46879     # since paths with space are more likely in Windows. Give it another try with the whole
46880     # argument.
46881     path="$complete"
46882     arguments="EOL"
46883     new_path=`$CYGPATH -u "$path"`
46884     new_path=`$WHICH "$new_path" 2> /dev/null`
46885     # bat and cmd files are not always considered executable in cygwin causing which
46886     # to not find them
46887     if test "x$new_path" = x \
46888         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46889         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46890       new_path=`$CYGPATH -u "$path"`
46891     fi
46892     if test "x$new_path" = x; then
46893       # It's still not found. Now this is an unrecoverable error.
46894       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46895 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46896       has_space=`$ECHO "$complete" | $GREP " "`
46897       if test "x$has_space" != x; then
46898         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46899 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46900       fi
46901       as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46902     fi
46903   fi
46904 
46905   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46906   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46907   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46908   # "foo.exe" is OK but "foo" is an error.
46909   #
46910   # This test is therefore slightly more accurate than "test -f" to check for file presence.
46911   # It is also a way to make sure we got the proper file name for the real test later on.
46912   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46913   if test "x$test_shortpath" = x; then
46914     # Short path failed, file does not exist as specified.
46915     # Try adding .exe or .cmd
46916     if test -f "${new_path}.exe"; then
46917       input_to_shortpath="${new_path}.exe"
46918     elif test -f "${new_path}.cmd"; then
46919       input_to_shortpath="${new_path}.cmd"
46920     else
46921       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
46922 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
46923       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46924 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46925       as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46926     fi
46927   else
46928     input_to_shortpath="$new_path"
46929   fi
46930 
46931   # Call helper function which possibly converts this using DOS-style short mode.
46932   # If so, the updated path is stored in $new_path.
46933   new_path="$input_to_shortpath"
46934 
46935   input_path="$input_to_shortpath"
46936   # Check if we need to convert this using DOS-style short mode. If the path
46937   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46938   # take no chances and rewrite it.
46939   # Note: m4 eats our [], so we need to use [ and ] instead.
46940   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46941   if test "x$has_forbidden_chars" != x; then
46942     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46943     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46944     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46945     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46946       # Going to short mode and back again did indeed matter. Since short mode is
46947       # case insensitive, let's make it lowercase to improve readability.
46948       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46949       # Now convert it back to Unix-style (cygpath)
46950       input_path=`$CYGPATH -u "$shortmode_path"`
46951       new_path="$input_path"
46952     fi
46953   fi
46954 
46955   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46956   if test "x$test_cygdrive_prefix" = x; then
46957     # As a simple fix, exclude /usr/bin since it's not a real path.
46958     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46959       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46960       # a path prefixed by /cygdrive for fixpath to work.
46961       new_path="$CYGWIN_ROOT_PATH$input_path"
46962     fi
46963   fi
46964 
46965   # remove trailing .exe if any
46966   new_path="${new_path/%.exe/}"
46967 
46968     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46969 
46970   # First separate the path from the arguments. This will split at the first
46971   # space.
46972   complete="$BUILD_OBJCOPY"
46973   path="${complete%% *}"
46974   tmp="$complete EOL"
46975   arguments="${tmp#* }"
46976 
46977   # Input might be given as Windows format, start by converting to
46978   # unix format.
46979   new_path="$path"
46980 
46981   windows_path="$new_path"
46982   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46983     unix_path=`$CYGPATH -u "$windows_path"`
46984     new_path="$unix_path"
46985   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46986     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46987     new_path="$unix_path"
46988   fi
46989 
46990 
46991   # Now try to locate executable using which
46992   new_path=`$WHICH "$new_path" 2> /dev/null`
46993 
46994   if test "x$new_path" = x; then
46995     # Oops. Which didn't find the executable.
46996     # The splitting of arguments from the executable at a space might have been incorrect,
46997     # since paths with space are more likely in Windows. Give it another try with the whole
46998     # argument.
46999     path="$complete"
47000     arguments="EOL"
47001     new_path="$path"
47002 
47003   windows_path="$new_path"
47004   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47005     unix_path=`$CYGPATH -u "$windows_path"`
47006     new_path="$unix_path"
47007   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47008     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47009     new_path="$unix_path"
47010   fi
47011 
47012 
47013     new_path=`$WHICH "$new_path" 2> /dev/null`
47014     # bat and cmd files are not always considered executable in MSYS causing which
47015     # to not find them
47016     if test "x$new_path" = x \
47017         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47018         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47019       new_path="$path"
47020 
47021   windows_path="$new_path"
47022   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47023     unix_path=`$CYGPATH -u "$windows_path"`
47024     new_path="$unix_path"
47025   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47026     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47027     new_path="$unix_path"
47028   fi
47029 
47030     fi
47031 
47032     if test "x$new_path" = x; then
47033       # It's still not found. Now this is an unrecoverable error.
47034       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47035 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47036       has_space=`$ECHO "$complete" | $GREP " "`
47037       if test "x$has_space" != x; then
47038         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47039 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47040       fi
47041       as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47042     fi
47043   fi
47044 
47045   # Now new_path has a complete unix path to the binary
47046   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
47047     # Keep paths in /bin as-is, but remove trailing .exe if any
47048     new_path="${new_path/%.exe/}"
47049     # Do not save /bin paths to all_fixpath_prefixes!
47050   else
47051     # Not in mixed or Windows style, start by that.
47052     new_path=`cmd //c echo $new_path`
47053 
47054   input_path="$new_path"
47055   # Check if we need to convert this using DOS-style short mode. If the path
47056   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47057   # take no chances and rewrite it.
47058   # Note: m4 eats our [], so we need to use [ and ] instead.
47059   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47060   if test "x$has_forbidden_chars" != x; then
47061     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47062     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47063   fi
47064 
47065     # Output is in $new_path
47066 
47067   windows_path="$new_path"
47068   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47069     unix_path=`$CYGPATH -u "$windows_path"`
47070     new_path="$unix_path"
47071   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47072     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47073     new_path="$unix_path"
47074   fi
47075 
47076     # remove trailing .exe if any
47077     new_path="${new_path/%.exe/}"
47078 
47079     # Save the first 10 bytes of this path to the storage, so fixpath can work.
47080     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47081   fi
47082 
47083     else
47084       # We're on a unix platform. Hooray! :)
47085       # First separate the path from the arguments. This will split at the first
47086       # space.
47087       complete="$BUILD_OBJCOPY"
47088       path="${complete%% *}"
47089       tmp="$complete EOL"
47090       arguments="${tmp#* }"
47091 
47092       # Cannot rely on the command "which" here since it doesn't always work.
47093       is_absolute_path=`$ECHO "$path" | $GREP ^/`
47094       if test -z "$is_absolute_path"; then
47095         # Path to executable is not absolute. Find it.
47096         IFS_save="$IFS"
47097         IFS=:
47098         for p in $PATH; do
47099           if test -f "$p/$path" && test -x "$p/$path"; then
47100             new_path="$p/$path"
47101             break
47102           fi
47103         done
47104         IFS="$IFS_save"
47105       else
47106         # This is an absolute path, we can use it without further modifications.
47107         new_path="$path"
47108       fi
47109 
47110       if test "x$new_path" = x; then
47111         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47112 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47113         has_space=`$ECHO "$complete" | $GREP " "`
47114         if test "x$has_space" != x; then
47115           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
47116 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
47117         fi
47118         as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47119       fi
47120     fi
47121 
47122     # Now join together the path and the arguments once again
47123     if test "x$arguments" != xEOL; then
47124       new_complete="$new_path ${arguments% *}"
47125     else
47126       new_complete="$new_path"
47127     fi
47128 
47129     if test "x$complete" != "x$new_complete"; then
47130       BUILD_OBJCOPY="$new_complete"
47131       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
47132 $as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
47133     fi
47134   fi
47135 
47136 
47137 
47138   # Publish this variable in the help.
47139 
47140 
47141   if [ -z "${BUILD_STRIP+x}" ]; then
47142     # The variable is not set by user, try to locate tool using the code snippet
47143     for ac_prog in strip
47144 do
47145   # Extract the first word of "$ac_prog", so it can be a program name with args.
47146 set dummy $ac_prog; ac_word=$2
47147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47148 $as_echo_n "checking for $ac_word... " >&6; }
47149 if ${ac_cv_path_BUILD_STRIP+:} false; then :
47150   $as_echo_n "(cached) " >&6
47151 else
47152   case $BUILD_STRIP in
47153   [\\/]* | ?:[\\/]*)
47154   ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47155   ;;
47156   *)
47157   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47158 for as_dir in $PATH
47159 do
47160   IFS=$as_save_IFS
47161   test -z "$as_dir" && as_dir=.
47162     for ac_exec_ext in '' $ac_executable_extensions; do
47163   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47164     ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47165     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47166     break 2
47167   fi
47168 done
47169   done
47170 IFS=$as_save_IFS
47171 
47172   ;;
47173 esac
47174 fi
47175 BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47176 if test -n "$BUILD_STRIP"; then
47177   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47178 $as_echo "$BUILD_STRIP" >&6; }
47179 else
47180   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47181 $as_echo "no" >&6; }
47182 fi
47183 
47184 
47185   test -n "$BUILD_STRIP" && break
47186 done
47187 
47188   else
47189     # The variable is set, but is it from the command line or the environment?
47190 
47191     # Try to remove the string !BUILD_STRIP! from our list.
47192     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
47193     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
47194       # If it failed, the variable was not from the command line. Ignore it,
47195       # but warn the user (except for BASH, which is always set by the calling BASH).
47196       if test "xBUILD_STRIP" != xBASH; then
47197         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
47198 $as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
47199       fi
47200       # Try to locate tool using the code snippet
47201       for ac_prog in strip
47202 do
47203   # Extract the first word of "$ac_prog", so it can be a program name with args.
47204 set dummy $ac_prog; ac_word=$2
47205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47206 $as_echo_n "checking for $ac_word... " >&6; }
47207 if ${ac_cv_path_BUILD_STRIP+:} false; then :
47208   $as_echo_n "(cached) " >&6
47209 else
47210   case $BUILD_STRIP in
47211   [\\/]* | ?:[\\/]*)
47212   ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47213   ;;
47214   *)
47215   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47216 for as_dir in $PATH
47217 do
47218   IFS=$as_save_IFS
47219   test -z "$as_dir" && as_dir=.
47220     for ac_exec_ext in '' $ac_executable_extensions; do
47221   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47222     ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47223     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47224     break 2
47225   fi
47226 done
47227   done
47228 IFS=$as_save_IFS
47229 
47230   ;;
47231 esac
47232 fi
47233 BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47234 if test -n "$BUILD_STRIP"; then
47235   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47236 $as_echo "$BUILD_STRIP" >&6; }
47237 else
47238   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47239 $as_echo "no" >&6; }
47240 fi
47241 
47242 
47243   test -n "$BUILD_STRIP" && break
47244 done
47245 
47246     else
47247       # If it succeeded, then it was overridden by the user. We will use it
47248       # for the tool.
47249 
47250       # First remove it from the list of overridden variables, so we can test
47251       # for unknown variables in the end.
47252       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
47253 
47254       # Check if we try to supply an empty value
47255       if test "x$BUILD_STRIP" = x; then
47256         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
47257 $as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
47258         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
47259 $as_echo_n "checking for BUILD_STRIP... " >&6; }
47260         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
47261 $as_echo "disabled" >&6; }
47262       else
47263         # Check if the provided tool contains a complete path.
47264         tool_specified="$BUILD_STRIP"
47265         tool_basename="${tool_specified##*/}"
47266         if test "x$tool_basename" = "x$tool_specified"; then
47267           # A command without a complete path is provided, search $PATH.
47268           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
47269 $as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
47270           # Extract the first word of "$tool_basename", so it can be a program name with args.
47271 set dummy $tool_basename; ac_word=$2
47272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47273 $as_echo_n "checking for $ac_word... " >&6; }
47274 if ${ac_cv_path_BUILD_STRIP+:} false; then :
47275   $as_echo_n "(cached) " >&6
47276 else
47277   case $BUILD_STRIP in
47278   [\\/]* | ?:[\\/]*)
47279   ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47280   ;;
47281   *)
47282   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47283 for as_dir in $PATH
47284 do
47285   IFS=$as_save_IFS
47286   test -z "$as_dir" && as_dir=.
47287     for ac_exec_ext in '' $ac_executable_extensions; do
47288   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47289     ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47290     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47291     break 2
47292   fi
47293 done
47294   done
47295 IFS=$as_save_IFS
47296 
47297   ;;
47298 esac
47299 fi
47300 BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47301 if test -n "$BUILD_STRIP"; then
47302   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47303 $as_echo "$BUILD_STRIP" >&6; }
47304 else
47305   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47306 $as_echo "no" >&6; }
47307 fi
47308 
47309 
47310           if test "x$BUILD_STRIP" = x; then
47311             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
47312           fi
47313         else
47314           # Otherwise we believe it is a complete path. Use it as it is.
47315           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
47316 $as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
47317           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
47318 $as_echo_n "checking for BUILD_STRIP... " >&6; }
47319           if test ! -x "$tool_specified"; then
47320             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
47321 $as_echo "not found" >&6; }
47322             as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
47323           fi
47324           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
47325 $as_echo "$tool_specified" >&6; }
47326         fi
47327       fi
47328     fi
47329 
47330   fi
47331 
47332 
47333 
47334   # Only process if variable expands to non-empty
47335 
47336   if test "x$BUILD_STRIP" != x; then
47337     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47338 
47339   # First separate the path from the arguments. This will split at the first
47340   # space.
47341   complete="$BUILD_STRIP"
47342   path="${complete%% *}"
47343   tmp="$complete EOL"
47344   arguments="${tmp#* }"
47345 
47346   # Input might be given as Windows format, start by converting to
47347   # unix format.
47348   new_path=`$CYGPATH -u "$path"`
47349 
47350   # Now try to locate executable using which
47351   new_path=`$WHICH "$new_path" 2> /dev/null`
47352   # bat and cmd files are not always considered executable in cygwin causing which
47353   # to not find them
47354   if test "x$new_path" = x \
47355       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47356       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47357     new_path=`$CYGPATH -u "$path"`
47358   fi
47359   if test "x$new_path" = x; then
47360     # Oops. Which didn't find the executable.
47361     # The splitting of arguments from the executable at a space might have been incorrect,
47362     # since paths with space are more likely in Windows. Give it another try with the whole
47363     # argument.
47364     path="$complete"
47365     arguments="EOL"
47366     new_path=`$CYGPATH -u "$path"`
47367     new_path=`$WHICH "$new_path" 2> /dev/null`
47368     # bat and cmd files are not always considered executable in cygwin causing which
47369     # to not find them
47370     if test "x$new_path" = x \
47371         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47372         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47373       new_path=`$CYGPATH -u "$path"`
47374     fi
47375     if test "x$new_path" = x; then
47376       # It's still not found. Now this is an unrecoverable error.
47377       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47378 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47379       has_space=`$ECHO "$complete" | $GREP " "`
47380       if test "x$has_space" != x; then
47381         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47382 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47383       fi
47384       as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47385     fi
47386   fi
47387 
47388   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47389   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47390   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47391   # "foo.exe" is OK but "foo" is an error.
47392   #
47393   # This test is therefore slightly more accurate than "test -f" to check for file presence.
47394   # It is also a way to make sure we got the proper file name for the real test later on.
47395   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47396   if test "x$test_shortpath" = x; then
47397     # Short path failed, file does not exist as specified.
47398     # Try adding .exe or .cmd
47399     if test -f "${new_path}.exe"; then
47400       input_to_shortpath="${new_path}.exe"
47401     elif test -f "${new_path}.cmd"; then
47402       input_to_shortpath="${new_path}.cmd"
47403     else
47404       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
47405 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
47406       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
47407 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
47408       as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47409     fi
47410   else
47411     input_to_shortpath="$new_path"
47412   fi
47413 
47414   # Call helper function which possibly converts this using DOS-style short mode.
47415   # If so, the updated path is stored in $new_path.
47416   new_path="$input_to_shortpath"
47417 
47418   input_path="$input_to_shortpath"
47419   # Check if we need to convert this using DOS-style short mode. If the path
47420   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47421   # take no chances and rewrite it.
47422   # Note: m4 eats our [], so we need to use [ and ] instead.
47423   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47424   if test "x$has_forbidden_chars" != x; then
47425     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47426     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47427     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47428     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47429       # Going to short mode and back again did indeed matter. Since short mode is
47430       # case insensitive, let's make it lowercase to improve readability.
47431       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47432       # Now convert it back to Unix-style (cygpath)
47433       input_path=`$CYGPATH -u "$shortmode_path"`
47434       new_path="$input_path"
47435     fi
47436   fi
47437 
47438   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47439   if test "x$test_cygdrive_prefix" = x; then
47440     # As a simple fix, exclude /usr/bin since it's not a real path.
47441     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
47442       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47443       # a path prefixed by /cygdrive for fixpath to work.
47444       new_path="$CYGWIN_ROOT_PATH$input_path"
47445     fi
47446   fi
47447 
47448   # remove trailing .exe if any
47449   new_path="${new_path/%.exe/}"
47450 
47451     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47452 
47453   # First separate the path from the arguments. This will split at the first
47454   # space.
47455   complete="$BUILD_STRIP"
47456   path="${complete%% *}"
47457   tmp="$complete EOL"
47458   arguments="${tmp#* }"
47459 
47460   # Input might be given as Windows format, start by converting to
47461   # unix format.
47462   new_path="$path"
47463 
47464   windows_path="$new_path"
47465   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47466     unix_path=`$CYGPATH -u "$windows_path"`
47467     new_path="$unix_path"
47468   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47469     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47470     new_path="$unix_path"
47471   fi
47472 
47473 
47474   # Now try to locate executable using which
47475   new_path=`$WHICH "$new_path" 2> /dev/null`
47476 
47477   if test "x$new_path" = x; then
47478     # Oops. Which didn't find the executable.
47479     # The splitting of arguments from the executable at a space might have been incorrect,
47480     # since paths with space are more likely in Windows. Give it another try with the whole
47481     # argument.
47482     path="$complete"
47483     arguments="EOL"
47484     new_path="$path"
47485 
47486   windows_path="$new_path"
47487   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47488     unix_path=`$CYGPATH -u "$windows_path"`
47489     new_path="$unix_path"
47490   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47491     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47492     new_path="$unix_path"
47493   fi
47494 
47495 
47496     new_path=`$WHICH "$new_path" 2> /dev/null`
47497     # bat and cmd files are not always considered executable in MSYS causing which
47498     # to not find them
47499     if test "x$new_path" = x \
47500         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47501         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47502       new_path="$path"
47503 
47504   windows_path="$new_path"
47505   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47506     unix_path=`$CYGPATH -u "$windows_path"`
47507     new_path="$unix_path"
47508   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47509     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47510     new_path="$unix_path"
47511   fi
47512 
47513     fi
47514 
47515     if test "x$new_path" = x; then
47516       # It's still not found. Now this is an unrecoverable error.
47517       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47518 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47519       has_space=`$ECHO "$complete" | $GREP " "`
47520       if test "x$has_space" != x; then
47521         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47522 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47523       fi
47524       as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47525     fi
47526   fi
47527 
47528   # Now new_path has a complete unix path to the binary
47529   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
47530     # Keep paths in /bin as-is, but remove trailing .exe if any
47531     new_path="${new_path/%.exe/}"
47532     # Do not save /bin paths to all_fixpath_prefixes!
47533   else
47534     # Not in mixed or Windows style, start by that.
47535     new_path=`cmd //c echo $new_path`
47536 
47537   input_path="$new_path"
47538   # Check if we need to convert this using DOS-style short mode. If the path
47539   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47540   # take no chances and rewrite it.
47541   # Note: m4 eats our [], so we need to use [ and ] instead.
47542   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47543   if test "x$has_forbidden_chars" != x; then
47544     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47545     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47546   fi
47547 
47548     # Output is in $new_path
47549 
47550   windows_path="$new_path"
47551   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47552     unix_path=`$CYGPATH -u "$windows_path"`
47553     new_path="$unix_path"
47554   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47555     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47556     new_path="$unix_path"
47557   fi
47558 
47559     # remove trailing .exe if any
47560     new_path="${new_path/%.exe/}"
47561 
47562     # Save the first 10 bytes of this path to the storage, so fixpath can work.
47563     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47564   fi
47565 
47566     else
47567       # We're on a unix platform. Hooray! :)
47568       # First separate the path from the arguments. This will split at the first
47569       # space.
47570       complete="$BUILD_STRIP"
47571       path="${complete%% *}"
47572       tmp="$complete EOL"
47573       arguments="${tmp#* }"
47574 
47575       # Cannot rely on the command "which" here since it doesn't always work.
47576       is_absolute_path=`$ECHO "$path" | $GREP ^/`
47577       if test -z "$is_absolute_path"; then
47578         # Path to executable is not absolute. Find it.
47579         IFS_save="$IFS"
47580         IFS=:
47581         for p in $PATH; do
47582           if test -f "$p/$path" && test -x "$p/$path"; then
47583             new_path="$p/$path"
47584             break
47585           fi
47586         done
47587         IFS="$IFS_save"
47588       else
47589         # This is an absolute path, we can use it without further modifications.
47590         new_path="$path"
47591       fi
47592 
47593       if test "x$new_path" = x; then
47594         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47595 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47596         has_space=`$ECHO "$complete" | $GREP " "`
47597         if test "x$has_space" != x; then
47598           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
47599 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
47600         fi
47601         as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47602       fi
47603     fi
47604 
47605     # Now join together the path and the arguments once again
47606     if test "x$arguments" != xEOL; then
47607       new_complete="$new_path ${arguments% *}"
47608     else
47609       new_complete="$new_path"
47610     fi
47611 
47612     if test "x$complete" != "x$new_complete"; then
47613       BUILD_STRIP="$new_complete"
47614       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
47615 $as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
47616     fi
47617   fi
47618 
47619     # Assume the C compiler is the assembler
47620     BUILD_AS="$BUILD_CC -c"
47621     # Just like for the target compiler, use the compiler as linker
47622     BUILD_LD="$BUILD_CC"
47623     BUILD_LDCXX="$BUILD_CXX"
47624 
47625     PATH="$OLDPATH"
47626 
47627 
47628   COMPILER=$BUILD_CC
47629   COMPILER_NAME=BuildC
47630 
47631   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47632     # cc -V output typically looks like
47633     #     cc: Sun C 5.12 Linux_i386 2011/11/16
47634     # or
47635     #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
47636     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47637     # Check that this is likely to be the Solaris Studio cc.
47638     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
47639     if test $? -ne 0; then
47640       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47641       { $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
47642 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47643       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47644 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47645       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47646 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47647       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47648     fi
47649     # Remove usage instructions (if present), and
47650     # collapse compiler output into a single line
47651     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47652         $SED -e 's/ *[Uu]sage:.*//'`
47653     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47654         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47655   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47656     # xlc -qversion output typically looks like
47657     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47658     #     Version: 11.01.0000.0015
47659     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47660     # Check that this is likely to be the IBM XL C compiler.
47661     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47662     if test $? -ne 0; then
47663       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47664       { $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
47665 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47666       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47667 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47668       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47669 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47670       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47671     fi
47672     # Collapse compiler output into a single line
47673     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47674     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47675         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47676   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47677     # There is no specific version flag, but all output starts with a version string.
47678     # First line typically looks something like:
47679     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47680     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47681     # Check that this is likely to be Microsoft CL.EXE.
47682     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47683     if test $? -ne 0; then
47684       { $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
47685 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47686       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47687 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47688       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47689     fi
47690     # Collapse compiler output into a single line
47691     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47692     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47693         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47694   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47695     # gcc --version output typically looks like
47696     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47697     #     Copyright (C) 2013 Free Software Foundation, Inc.
47698     #     This is free software; see the source for copying conditions.  There is NO
47699     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47700     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47701     # Check that this is likely to be GCC.
47702     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47703     if test $? -ne 0; then
47704       { $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
47705 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47706       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47707 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47708       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47709     fi
47710     # Remove Copyright and legalese from version string, and
47711     # collapse into a single line
47712     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47713         $SED -e 's/ *Copyright .*//'`
47714     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47715         $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47716   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47717     # clang --version output typically looks like
47718     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47719     #    clang version 3.3 (tags/RELEASE_33/final)
47720     # or
47721     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47722     #    Target: x86_64-pc-linux-gnu
47723     #    Thread model: posix
47724     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47725     # Check that this is likely to be clang
47726     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47727     if test $? -ne 0; then
47728       { $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
47729 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47730       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47731 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47732       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47733     fi
47734     # Collapse compiler output into a single line
47735     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47736     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47737         $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47738   else
47739       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47740   fi
47741   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47742   BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47743   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47744   BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
47745 
47746   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47747 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47748 
47749 
47750   COMPILER=$BUILD_CXX
47751   COMPILER_NAME=BuildC++
47752 
47753   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47754     # cc -V output typically looks like
47755     #     cc: Sun C 5.12 Linux_i386 2011/11/16
47756     # or
47757     #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
47758     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47759     # Check that this is likely to be the Solaris Studio cc.
47760     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
47761     if test $? -ne 0; then
47762       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47763       { $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
47764 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47765       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47766 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47767       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47768 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47769       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47770     fi
47771     # Remove usage instructions (if present), and
47772     # collapse compiler output into a single line
47773     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47774         $SED -e 's/ *[Uu]sage:.*//'`
47775     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47776         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47777   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47778     # xlc -qversion output typically looks like
47779     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47780     #     Version: 11.01.0000.0015
47781     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47782     # Check that this is likely to be the IBM XL C compiler.
47783     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47784     if test $? -ne 0; then
47785       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47786       { $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
47787 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47788       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47789 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47790       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47791 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47792       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47793     fi
47794     # Collapse compiler output into a single line
47795     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47796     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47797         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47798   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47799     # There is no specific version flag, but all output starts with a version string.
47800     # First line typically looks something like:
47801     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47802     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47803     # Check that this is likely to be Microsoft CL.EXE.
47804     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47805     if test $? -ne 0; then
47806       { $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
47807 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47808       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47809 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47810       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47811     fi
47812     # Collapse compiler output into a single line
47813     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47814     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47815         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47816   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47817     # gcc --version output typically looks like
47818     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47819     #     Copyright (C) 2013 Free Software Foundation, Inc.
47820     #     This is free software; see the source for copying conditions.  There is NO
47821     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47822     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47823     # Check that this is likely to be GCC.
47824     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47825     if test $? -ne 0; then
47826       { $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
47827 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47828       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47829 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47830       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47831     fi
47832     # Remove Copyright and legalese from version string, and
47833     # collapse into a single line
47834     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47835         $SED -e 's/ *Copyright .*//'`
47836     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47837         $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47838   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47839     # clang --version output typically looks like
47840     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47841     #    clang version 3.3 (tags/RELEASE_33/final)
47842     # or
47843     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47844     #    Target: x86_64-pc-linux-gnu
47845     #    Thread model: posix
47846     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47847     # Check that this is likely to be clang
47848     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47849     if test $? -ne 0; then
47850       { $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
47851 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47852       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47853 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47854       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47855     fi
47856     # Collapse compiler output into a single line
47857     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47858     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47859         $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47860   else
47861       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47862   fi
47863   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47864   BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47865   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47866   BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
47867 
47868   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47869 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47870 
47871 
47872   if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
47873     { $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
47874 $as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
47875     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47876 $as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47877   fi
47878 
47879   # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47880   if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
47881     { $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
47882 $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;}
47883   fi
47884 
47885   if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47886     { $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
47887 $as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47888   fi
47889 
47890   OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$BUILD_CC_VERSION_NUMBER"`
47891 
47892   else
47893     # If we are not cross compiling, use the normal target compilers for
47894     # building the build platform executables.
47895     BUILD_CC="$CC"
47896     BUILD_CXX="$CXX"
47897     BUILD_LD="$LD"
47898     BUILD_LDCXX="$LDCXX"
47899     BUILD_NM="$NM"
47900     BUILD_AS="$AS"
47901     BUILD_OBJCOPY="$OBJCOPY"
47902     BUILD_STRIP="$STRIP"
47903     BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
47904     BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
47905     BUILD_AR="$AR"
47906 
47907 
47908   if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
47909     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
47910 $as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
47911     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47912 $as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47913   fi
47914 
47915   # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47916   if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
47917     { $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
47918 $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;}
47919   fi
47920 
47921   if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47922     { $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
47923 $as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47924   fi
47925 
47926   OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
47927 
47928   fi
47929 
47930 
47931 
47932 
47933 
47934 
47935 
47936 
47937 
47938 
47939 
47940 
47941 
47942 
47943   # The package path is used only on macosx?
47944   # FIXME: clean this up, and/or move it elsewhere.
47945   PACKAGE_PATH=/opt/local
47946 
47947 
47948   # Check for extra potential brokenness.
47949   if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47950     # On Windows, double-check that we got the right compiler.
47951     CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47952     COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
47953     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
47954       if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
47955         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
47956       fi
47957     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
47958       if test "x$COMPILER_CPU_TEST" != "xx64"; then
47959         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
47960       fi
47961     fi
47962   fi
47963 
47964   if test "x$TOOLCHAIN_TYPE" = xgcc; then
47965     # If this is a --hash-style=gnu system, use --hash-style=both, why?
47966     HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
47967     # This is later checked when setting flags.
47968 
47969     # "-Og" suppported for GCC 4.8 and later
47970     CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
47971 
47972 
47973 
47974 
47975 
47976 
47977 
47978 
47979 
47980 
47981 
47982 
47983 
47984 
47985 
47986 
47987 
47988 
47989 
47990 
47991 
47992 
47993 
47994 
47995 
47996 
47997 
47998 
47999 
48000 
48001 
48002 
48003 
48004 
48005 
48006 
48007 
48008 
48009 
48010 
48011 
48012 
48013 
48014 
48015 
48016 
48017 
48018     # Execute function body
48019 
48020 
48021 
48022 
48023 
48024 
48025 
48026 
48027 
48028 
48029 
48030 
48031 
48032 
48033 
48034 
48035 
48036 
48037 
48038 
48039 
48040 
48041 
48042 
48043 
48044 
48045 
48046 
48047 
48048 
48049 
48050 
48051 
48052 
48053 
48054 
48055 
48056 
48057 
48058 
48059 
48060 
48061 
48062 
48063 
48064 
48065 
48066 
48067     # Execute function body
48068 
48069   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48070 $as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48071   supports=yes
48072 
48073   saved_cflags="$CFLAGS"
48074   CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
48075   ac_ext=c
48076 ac_cpp='$CPP $CPPFLAGS'
48077 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48078 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48079 ac_compiler_gnu=$ac_cv_c_compiler_gnu
48080 
48081   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48082 /* end confdefs.h.  */
48083 int i;
48084 _ACEOF
48085 if ac_fn_c_try_compile "$LINENO"; then :
48086 
48087 else
48088   supports=no
48089 fi
48090 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48091   ac_ext=cpp
48092 ac_cpp='$CXXCPP $CPPFLAGS'
48093 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48094 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48095 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48096 
48097   CFLAGS="$saved_cflags"
48098 
48099   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48100 $as_echo "$supports" >&6; }
48101   if test "x$supports" = "xyes" ; then
48102     :
48103     C_COMP_SUPPORTS="yes"
48104   else
48105     :
48106     C_COMP_SUPPORTS="no"
48107   fi
48108 
48109 
48110 
48111 
48112 
48113 
48114 
48115 
48116 
48117 
48118 
48119 
48120 
48121 
48122 
48123 
48124 
48125 
48126 
48127 
48128 
48129 
48130 
48131 
48132 
48133 
48134 
48135 
48136 
48137 
48138 
48139 
48140 
48141 
48142 
48143 
48144 
48145 
48146 
48147 
48148 
48149 
48150 
48151 
48152 
48153 
48154 
48155 
48156 
48157 
48158 
48159 
48160 
48161 
48162 
48163 
48164 
48165 
48166 
48167     # Execute function body
48168 
48169   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48170 $as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48171   supports=yes
48172 
48173   saved_cxxflags="$CXXFLAGS"
48174   CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
48175   ac_ext=cpp
48176 ac_cpp='$CXXCPP $CPPFLAGS'
48177 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48178 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48179 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48180 
48181   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48182 /* end confdefs.h.  */
48183 int i;
48184 _ACEOF
48185 if ac_fn_cxx_try_compile "$LINENO"; then :
48186 
48187 else
48188   supports=no
48189 fi
48190 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48191   ac_ext=cpp
48192 ac_cpp='$CXXCPP $CPPFLAGS'
48193 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48194 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48195 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48196 
48197   CXXFLAGS="$saved_cxxflags"
48198 
48199   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48200 $as_echo "$supports" >&6; }
48201   if test "x$supports" = "xyes" ; then
48202     :
48203     CXX_COMP_SUPPORTS="yes"
48204   else
48205     :
48206     CXX_COMP_SUPPORTS="no"
48207   fi
48208 
48209 
48210 
48211 
48212 
48213 
48214 
48215 
48216 
48217 
48218 
48219 
48220 
48221   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48222 $as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48223   supports=no
48224   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
48225 
48226   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48227 $as_echo "$supports" >&6; }
48228   if test "x$supports" = "xyes" ; then
48229     :
48230     HAS_CFLAG_OPTIMIZE_DEBUG=true
48231   else
48232     :
48233     HAS_CFLAG_OPTIMIZE_DEBUG=false
48234   fi
48235 
48236 
48237 
48238 
48239 
48240 
48241 
48242     # "-z relro" supported in GNU binutils 2.17 and later
48243     LINKER_RELRO_FLAG="-Wl,-z,relro"
48244 
48245 
48246 
48247 
48248 
48249 
48250 
48251 
48252 
48253 
48254 
48255 
48256 
48257 
48258 
48259 
48260 
48261 
48262 
48263 
48264 
48265 
48266 
48267 
48268 
48269 
48270 
48271 
48272 
48273 
48274 
48275 
48276 
48277 
48278 
48279 
48280 
48281 
48282 
48283 
48284 
48285 
48286 
48287 
48288 
48289 
48290 
48291     # Execute function body
48292 
48293   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
48294 $as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
48295   supports=yes
48296 
48297   saved_ldflags="$LDFLAGS"
48298   LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
48299   ac_ext=c
48300 ac_cpp='$CPP $CPPFLAGS'
48301 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48302 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48303 ac_compiler_gnu=$ac_cv_c_compiler_gnu
48304 
48305   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48306 /* end confdefs.h.  */
48307 
48308 int
48309 main ()
48310 {
48311 
48312   ;
48313   return 0;
48314 }
48315 _ACEOF
48316 if ac_fn_c_try_link "$LINENO"; then :
48317 
48318 else
48319   supports=no
48320 fi
48321 rm -f core conftest.err conftest.$ac_objext \
48322     conftest$ac_exeext conftest.$ac_ext
48323   ac_ext=cpp
48324 ac_cpp='$CXXCPP $CPPFLAGS'
48325 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48326 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48327 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48328 
48329   LDFLAGS="$saved_ldflags"
48330 
48331   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48332 $as_echo "$supports" >&6; }
48333   if test "x$supports" = "xyes" ; then
48334     :
48335     HAS_LINKER_RELRO=true
48336   else
48337     :
48338     HAS_LINKER_RELRO=false
48339   fi
48340 
48341 
48342 
48343 
48344 
48345 
48346 
48347 
48348 
48349 
48350 
48351 
48352 
48353     # "-z now" supported in GNU binutils 2.11 and later
48354     LINKER_NOW_FLAG="-Wl,-z,now"
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 
48381 
48382 
48383 
48384 
48385 
48386 
48387 
48388 
48389 
48390 
48391 
48392 
48393 
48394 
48395 
48396 
48397 
48398 
48399 
48400 
48401 
48402     # Execute function body
48403 
48404   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
48405 $as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
48406   supports=yes
48407 
48408   saved_ldflags="$LDFLAGS"
48409   LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
48410   ac_ext=c
48411 ac_cpp='$CPP $CPPFLAGS'
48412 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48413 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48414 ac_compiler_gnu=$ac_cv_c_compiler_gnu
48415 
48416   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48417 /* end confdefs.h.  */
48418 
48419 int
48420 main ()
48421 {
48422 
48423   ;
48424   return 0;
48425 }
48426 _ACEOF
48427 if ac_fn_c_try_link "$LINENO"; then :
48428 
48429 else
48430   supports=no
48431 fi
48432 rm -f core conftest.err conftest.$ac_objext \
48433     conftest$ac_exeext conftest.$ac_ext
48434   ac_ext=cpp
48435 ac_cpp='$CXXCPP $CPPFLAGS'
48436 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48437 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48438 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48439 
48440   LDFLAGS="$saved_ldflags"
48441 
48442   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48443 $as_echo "$supports" >&6; }
48444   if test "x$supports" = "xyes" ; then
48445     :
48446     HAS_LINKER_NOW=true
48447   else
48448     :
48449     HAS_LINKER_NOW=false
48450   fi
48451 
48452 
48453 
48454 
48455 
48456 
48457 
48458 
48459 
48460 
48461 
48462 
48463   fi
48464 
48465   # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
48466   # in executable.'
48467   USING_BROKEN_SUSE_LD=no
48468   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
48469     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
48470 $as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
48471     $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
48472     $ECHO "int main() { }" > main.c
48473     if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
48474       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48475 $as_echo "no" >&6; }
48476       USING_BROKEN_SUSE_LD=no
48477     else
48478       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48479 $as_echo "yes" >&6; }
48480       USING_BROKEN_SUSE_LD=yes
48481     fi
48482     $RM version-script.map main.c a.out
48483   fi
48484 
48485 
48486   # Setup hotspot lecagy names for toolchains
48487   HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
48488   if test "x$TOOLCHAIN_TYPE" = xclang; then
48489     HOTSPOT_TOOLCHAIN_TYPE=gcc
48490   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48491     HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
48492   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48493     HOTSPOT_TOOLCHAIN_TYPE=visCPP
48494   fi
48495 
48496 
48497 
48498 # Setup the JTReg Regression Test Harness.
48499 
48500 
48501 # Check whether --with-jtreg was given.
48502 if test "${with_jtreg+set}" = set; then :
48503   withval=$with_jtreg;
48504 else
48505   with_jtreg=no
48506 fi
48507 
48508 
48509   if test "x$with_jtreg" = xno; then
48510     # jtreg disabled
48511     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
48512 $as_echo_n "checking for jtreg... " >&6; }
48513     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48514 $as_echo "no" >&6; }
48515   else
48516     if test "x$with_jtreg" != xyes; then
48517       # with path specified.
48518       JT_HOME="$with_jtreg"
48519     fi
48520 
48521     if test "x$JT_HOME" != x; then
48522       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
48523 $as_echo_n "checking for jtreg... " >&6; }
48524 
48525       # use JT_HOME enviroment var.
48526 
48527   # Only process if variable expands to non-empty
48528 
48529   if test "x$JT_HOME" != x; then
48530     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48531 
48532   # Input might be given as Windows format, start by converting to
48533   # unix format.
48534   path="$JT_HOME"
48535   new_path=`$CYGPATH -u "$path"`
48536 
48537   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48538   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48539   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48540   # "foo.exe" is OK but "foo" is an error.
48541   #
48542   # This test is therefore slightly more accurate than "test -f" to check for file precense.
48543   # It is also a way to make sure we got the proper file name for the real test later on.
48544   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48545   if test "x$test_shortpath" = x; then
48546     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
48547 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
48548     as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
48549   fi
48550 
48551   # Call helper function which possibly converts this using DOS-style short mode.
48552   # If so, the updated path is stored in $new_path.
48553 
48554   input_path="$new_path"
48555   # Check if we need to convert this using DOS-style short mode. If the path
48556   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48557   # take no chances and rewrite it.
48558   # Note: m4 eats our [], so we need to use [ and ] instead.
48559   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48560   if test "x$has_forbidden_chars" != x; then
48561     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48562     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48563     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48564     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48565       # Going to short mode and back again did indeed matter. Since short mode is
48566       # case insensitive, let's make it lowercase to improve readability.
48567       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48568       # Now convert it back to Unix-style (cygpath)
48569       input_path=`$CYGPATH -u "$shortmode_path"`
48570       new_path="$input_path"
48571     fi
48572   fi
48573 
48574   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48575   if test "x$test_cygdrive_prefix" = x; then
48576     # As a simple fix, exclude /usr/bin since it's not a real path.
48577     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48578       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48579       # a path prefixed by /cygdrive for fixpath to work.
48580       new_path="$CYGWIN_ROOT_PATH$input_path"
48581     fi
48582   fi
48583 
48584 
48585   if test "x$path" != "x$new_path"; then
48586     JT_HOME="$new_path"
48587     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
48588 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
48589   fi
48590 
48591     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48592 
48593   path="$JT_HOME"
48594   has_colon=`$ECHO $path | $GREP ^.:`
48595   new_path="$path"
48596   if test "x$has_colon" = x; then
48597     # Not in mixed or Windows style, start by that.
48598     new_path=`cmd //c echo $path`
48599   fi
48600 
48601 
48602   input_path="$new_path"
48603   # Check if we need to convert this using DOS-style short mode. If the path
48604   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48605   # take no chances and rewrite it.
48606   # Note: m4 eats our [], so we need to use [ and ] instead.
48607   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48608   if test "x$has_forbidden_chars" != x; then
48609     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48610     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48611   fi
48612 
48613 
48614   windows_path="$new_path"
48615   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48616     unix_path=`$CYGPATH -u "$windows_path"`
48617     new_path="$unix_path"
48618   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48619     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48620     new_path="$unix_path"
48621   fi
48622 
48623   if test "x$path" != "x$new_path"; then
48624     JT_HOME="$new_path"
48625     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
48626 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
48627   fi
48628 
48629   # Save the first 10 bytes of this path to the storage, so fixpath can work.
48630   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48631 
48632     else
48633       # We're on a unix platform. Hooray! :)
48634       path="$JT_HOME"
48635       has_space=`$ECHO "$path" | $GREP " "`
48636       if test "x$has_space" != x; then
48637         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
48638 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
48639         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48640       fi
48641 
48642       # Use eval to expand a potential ~
48643       eval path="$path"
48644       if test ! -f "$path" && test ! -d "$path"; then
48645         as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
48646       fi
48647 
48648       if test -d "$path"; then
48649         JT_HOME="`cd "$path"; $THEPWDCMD -L`"
48650       else
48651         dir="`$DIRNAME "$path"`"
48652         base="`$BASENAME "$path"`"
48653         JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
48654       fi
48655     fi
48656   fi
48657 
48658 
48659       # jtreg win32 script works for everybody
48660       JTREGEXE="$JT_HOME/bin/jtreg"
48661 
48662       if test ! -f "$JTREGEXE"; then
48663         as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
48664       fi
48665 
48666       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48667 $as_echo "$JTREGEXE" >&6; }
48668     else
48669       # try to find jtreg on path
48670 
48671 
48672 
48673   # Publish this variable in the help.
48674 
48675 
48676   if [ -z "${JTREGEXE+x}" ]; then
48677     # The variable is not set by user, try to locate tool using the code snippet
48678     for ac_prog in jtreg
48679 do
48680   # Extract the first word of "$ac_prog", so it can be a program name with args.
48681 set dummy $ac_prog; ac_word=$2
48682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48683 $as_echo_n "checking for $ac_word... " >&6; }
48684 if ${ac_cv_path_JTREGEXE+:} false; then :
48685   $as_echo_n "(cached) " >&6
48686 else
48687   case $JTREGEXE in
48688   [\\/]* | ?:[\\/]*)
48689   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48690   ;;
48691   *)
48692   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48693 for as_dir in $PATH
48694 do
48695   IFS=$as_save_IFS
48696   test -z "$as_dir" && as_dir=.
48697     for ac_exec_ext in '' $ac_executable_extensions; do
48698   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48699     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48700     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48701     break 2
48702   fi
48703 done
48704   done
48705 IFS=$as_save_IFS
48706 
48707   ;;
48708 esac
48709 fi
48710 JTREGEXE=$ac_cv_path_JTREGEXE
48711 if test -n "$JTREGEXE"; then
48712   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48713 $as_echo "$JTREGEXE" >&6; }
48714 else
48715   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48716 $as_echo "no" >&6; }
48717 fi
48718 
48719 
48720   test -n "$JTREGEXE" && break
48721 done
48722 
48723   else
48724     # The variable is set, but is it from the command line or the environment?
48725 
48726     # Try to remove the string !JTREGEXE! from our list.
48727     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
48728     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48729       # If it failed, the variable was not from the command line. Ignore it,
48730       # but warn the user (except for BASH, which is always set by the calling BASH).
48731       if test "xJTREGEXE" != xBASH; then
48732         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
48733 $as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
48734       fi
48735       # Try to locate tool using the code snippet
48736       for ac_prog in jtreg
48737 do
48738   # Extract the first word of "$ac_prog", so it can be a program name with args.
48739 set dummy $ac_prog; ac_word=$2
48740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48741 $as_echo_n "checking for $ac_word... " >&6; }
48742 if ${ac_cv_path_JTREGEXE+:} false; then :
48743   $as_echo_n "(cached) " >&6
48744 else
48745   case $JTREGEXE in
48746   [\\/]* | ?:[\\/]*)
48747   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48748   ;;
48749   *)
48750   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48751 for as_dir in $PATH
48752 do
48753   IFS=$as_save_IFS
48754   test -z "$as_dir" && as_dir=.
48755     for ac_exec_ext in '' $ac_executable_extensions; do
48756   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48757     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48758     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48759     break 2
48760   fi
48761 done
48762   done
48763 IFS=$as_save_IFS
48764 
48765   ;;
48766 esac
48767 fi
48768 JTREGEXE=$ac_cv_path_JTREGEXE
48769 if test -n "$JTREGEXE"; then
48770   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48771 $as_echo "$JTREGEXE" >&6; }
48772 else
48773   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48774 $as_echo "no" >&6; }
48775 fi
48776 
48777 
48778   test -n "$JTREGEXE" && break
48779 done
48780 
48781     else
48782       # If it succeeded, then it was overridden by the user. We will use it
48783       # for the tool.
48784 
48785       # First remove it from the list of overridden variables, so we can test
48786       # for unknown variables in the end.
48787       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48788 
48789       # Check if we try to supply an empty value
48790       if test "x$JTREGEXE" = x; then
48791         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
48792 $as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
48793         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48794 $as_echo_n "checking for JTREGEXE... " >&6; }
48795         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
48796 $as_echo "disabled" >&6; }
48797       else
48798         # Check if the provided tool contains a complete path.
48799         tool_specified="$JTREGEXE"
48800         tool_basename="${tool_specified##*/}"
48801         if test "x$tool_basename" = "x$tool_specified"; then
48802           # A command without a complete path is provided, search $PATH.
48803           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
48804 $as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
48805           # Extract the first word of "$tool_basename", so it can be a program name with args.
48806 set dummy $tool_basename; ac_word=$2
48807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48808 $as_echo_n "checking for $ac_word... " >&6; }
48809 if ${ac_cv_path_JTREGEXE+:} false; then :
48810   $as_echo_n "(cached) " >&6
48811 else
48812   case $JTREGEXE in
48813   [\\/]* | ?:[\\/]*)
48814   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48815   ;;
48816   *)
48817   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48818 for as_dir in $PATH
48819 do
48820   IFS=$as_save_IFS
48821   test -z "$as_dir" && as_dir=.
48822     for ac_exec_ext in '' $ac_executable_extensions; do
48823   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48824     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48825     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48826     break 2
48827   fi
48828 done
48829   done
48830 IFS=$as_save_IFS
48831 
48832   ;;
48833 esac
48834 fi
48835 JTREGEXE=$ac_cv_path_JTREGEXE
48836 if test -n "$JTREGEXE"; then
48837   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48838 $as_echo "$JTREGEXE" >&6; }
48839 else
48840   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48841 $as_echo "no" >&6; }
48842 fi
48843 
48844 
48845           if test "x$JTREGEXE" = x; then
48846             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48847           fi
48848         else
48849           # Otherwise we believe it is a complete path. Use it as it is.
48850           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
48851 $as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
48852           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48853 $as_echo_n "checking for JTREGEXE... " >&6; }
48854           if test ! -x "$tool_specified"; then
48855             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48856 $as_echo "not found" >&6; }
48857             as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
48858           fi
48859           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48860 $as_echo "$tool_specified" >&6; }
48861         fi
48862       fi
48863     fi
48864 
48865   fi
48866 
48867 
48868 
48869   if test "x$JTREGEXE" = x; then
48870     as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
48871   fi
48872 
48873 
48874       JT_HOME="`$DIRNAME $JTREGEXE`"
48875     fi
48876   fi
48877 
48878 
48879 
48880 
48881 
48882 
48883   # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
48884   # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
48885   # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
48886   #                              commands produced by the link step (currently AIX only)
48887   if test "x$TOOLCHAIN_TYPE" = xxlc; then
48888     COMPILER_TARGET_BITS_FLAG="-q"
48889     COMPILER_COMMAND_FILE_FLAG="-f"
48890     COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
48891   else
48892     COMPILER_TARGET_BITS_FLAG="-m"
48893     COMPILER_COMMAND_FILE_FLAG="@"
48894     COMPILER_BINDCMD_FILE_FLAG=""
48895 
48896     # The solstudio linker does not support @-files.
48897     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48898       COMPILER_COMMAND_FILE_FLAG=
48899     fi
48900 
48901     # Check if @file is supported by gcc
48902     if test "x$TOOLCHAIN_TYPE" = xgcc; then
48903       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
48904 $as_echo_n "checking if @file is supported by gcc... " >&6; }
48905       # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
48906       $ECHO "" "--version" > command.file
48907       if $CXX @command.file 2>&5 >&5; then
48908         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48909 $as_echo "yes" >&6; }
48910         COMPILER_COMMAND_FILE_FLAG="@"
48911       else
48912         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48913 $as_echo "no" >&6; }
48914         COMPILER_COMMAND_FILE_FLAG=
48915       fi
48916       $RM command.file
48917     fi
48918   fi
48919 
48920 
48921 
48922 
48923   # FIXME: figure out if we should select AR flags depending on OS or toolchain.
48924   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48925     ARFLAGS="-r"
48926   elif test "x$OPENJDK_TARGET_OS" = xaix; then
48927     ARFLAGS="-X64"
48928   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
48929     # lib.exe is used as AR to create static libraries.
48930     ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
48931   else
48932     ARFLAGS=""
48933   fi
48934 
48935 
48936   ## Setup strip.
48937   # FIXME: should this really be per platform, or should it be per toolchain type?
48938   # strip is not provided by clang or solstudio; so guessing platform makes most sense.
48939   # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
48940   if test "x$OPENJDK_TARGET_OS" = xlinux; then
48941     STRIPFLAGS="-g"
48942   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
48943     STRIPFLAGS="-x"
48944   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
48945     STRIPFLAGS="-S"
48946   elif test "x$OPENJDK_TARGET_OS" = xaix; then
48947     STRIPFLAGS="-X32_64"
48948   fi
48949 
48950 
48951 
48952   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48953     CC_OUT_OPTION=-Fo
48954     EXE_OUT_OPTION=-out:
48955     LD_OUT_OPTION=-out:
48956     AR_OUT_OPTION=-out:
48957   else
48958     # The option used to specify the target .o,.a or .so file.
48959     # When compiling, how to specify the to be created object file.
48960     CC_OUT_OPTION='-o$(SPACE)'
48961     # When linking, how to specify the to be created executable.
48962     EXE_OUT_OPTION='-o$(SPACE)'
48963     # When linking, how to specify the to be created dynamically linkable library.
48964     LD_OUT_OPTION='-o$(SPACE)'
48965     # When archiving, how to specify the to be create static archive for object files.
48966     AR_OUT_OPTION='rcs$(SPACE)'
48967   fi
48968 
48969 
48970 
48971 
48972 
48973   # On Windows, we need to set RC flags.
48974   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48975     RC_FLAGS="-nologo -l0x409"
48976     JVM_RCFLAGS="-nologo"
48977     if test "x$DEBUG_LEVEL" = xrelease; then
48978       RC_FLAGS="$RC_FLAGS -DNDEBUG"
48979       JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
48980     fi
48981 
48982     # The version variables used to create RC_FLAGS may be overridden
48983     # in a custom configure script, or possibly the command line.
48984     # Let those variables be expanded at make time in spec.gmk.
48985     # The \$ are escaped to the shell, and the $(...) variables
48986     # are evaluated by make.
48987     RC_FLAGS="$RC_FLAGS \
48988         -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
48989         -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
48990         -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
48991         -D\"JDK_VER=\$(VERSION_NUMBER)\" \
48992         -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
48993         -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
48994         -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
48995 
48996     JVM_RCFLAGS="$JVM_RCFLAGS \
48997         -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
48998         -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
48999         -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
49000         -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
49001         -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
49002         -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
49003         -D\"HS_FNAME=jvm.dll\" \
49004         -D\"HS_INTERNAL_NAME=jvm\""
49005   fi
49006 
49007 
49008 
49009   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49010     # silence copyright notice and other headers.
49011     COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
49012   fi
49013 
49014 
49015 # Now we can test some aspects on the target using configure macros.
49016 
49017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
49018 $as_echo_n "checking for ANSI C header files... " >&6; }
49019 if ${ac_cv_header_stdc+:} false; then :
49020   $as_echo_n "(cached) " >&6
49021 else
49022   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49023 /* end confdefs.h.  */
49024 #include <stdlib.h>
49025 #include <stdarg.h>
49026 #include <string.h>
49027 #include <float.h>
49028 
49029 int
49030 main ()
49031 {
49032 
49033   ;
49034   return 0;
49035 }
49036 _ACEOF
49037 if ac_fn_cxx_try_compile "$LINENO"; then :
49038   ac_cv_header_stdc=yes
49039 else
49040   ac_cv_header_stdc=no
49041 fi
49042 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49043 
49044 if test $ac_cv_header_stdc = yes; then
49045   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
49046   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49047 /* end confdefs.h.  */
49048 #include <string.h>
49049 
49050 _ACEOF
49051 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
49052   $EGREP "memchr" >/dev/null 2>&1; then :
49053 
49054 else
49055   ac_cv_header_stdc=no
49056 fi
49057 rm -f conftest*
49058 
49059 fi
49060 
49061 if test $ac_cv_header_stdc = yes; then
49062   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
49063   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49064 /* end confdefs.h.  */
49065 #include <stdlib.h>
49066 
49067 _ACEOF
49068 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
49069   $EGREP "free" >/dev/null 2>&1; then :
49070 
49071 else
49072   ac_cv_header_stdc=no
49073 fi
49074 rm -f conftest*
49075 
49076 fi
49077 
49078 if test $ac_cv_header_stdc = yes; then
49079   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
49080   if test "$cross_compiling" = yes; then :
49081   :
49082 else
49083   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49084 /* end confdefs.h.  */
49085 #include <ctype.h>
49086 #include <stdlib.h>
49087 #if ((' ' & 0x0FF) == 0x020)
49088 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
49089 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
49090 #else
49091 # define ISLOWER(c) \
49092                    (('a' <= (c) && (c) <= 'i') \
49093                      || ('j' <= (c) && (c) <= 'r') \
49094                      || ('s' <= (c) && (c) <= 'z'))
49095 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
49096 #endif
49097 
49098 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
49099 int
49100 main ()
49101 {
49102   int i;
49103   for (i = 0; i < 256; i++)
49104     if (XOR (islower (i), ISLOWER (i))
49105         || toupper (i) != TOUPPER (i))
49106       return 2;
49107   return 0;
49108 }
49109 _ACEOF
49110 if ac_fn_cxx_try_run "$LINENO"; then :
49111 
49112 else
49113   ac_cv_header_stdc=no
49114 fi
49115 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49116   conftest.$ac_objext conftest.beam conftest.$ac_ext
49117 fi
49118 
49119 fi
49120 fi
49121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
49122 $as_echo "$ac_cv_header_stdc" >&6; }
49123 if test $ac_cv_header_stdc = yes; then
49124 
49125 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
49126 
49127 fi
49128 
49129 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
49130 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
49131                   inttypes.h stdint.h unistd.h
49132 do :
49133   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
49134 ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
49135 "
49136 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
49137   cat >>confdefs.h <<_ACEOF
49138 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
49139 _ACEOF
49140 
49141 fi
49142 
49143 done
49144 
49145 
49146 
49147   ###############################################################################
49148   #
49149   # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
49150   # (The JVM can use 32 or 64 bit Java pointers but that decision
49151   # is made at runtime.)
49152   #
49153 
49154   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
49155     # Always specify -m flag on Solaris
49156     # And -q on AIX because otherwise the compiler produces 32-bit objects by default
49157 
49158   # When we add flags to the "official" CFLAGS etc, we need to
49159   # keep track of these additions in ADDED_CFLAGS etc. These
49160   # will later be checked to make sure only controlled additions
49161   # have been made to CFLAGS etc.
49162   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49163   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49164   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49165 
49166   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49167   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49168   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49169 
49170   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49171   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49172   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49173 
49174   JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49175   JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49176   JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49177 
49178   elif test "x$COMPILE_TYPE" = xreduced; then
49179     if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
49180       # Specify -m if running reduced on unix platforms
49181 
49182   # When we add flags to the "official" CFLAGS etc, we need to
49183   # keep track of these additions in ADDED_CFLAGS etc. These
49184   # will later be checked to make sure only controlled additions
49185   # have been made to CFLAGS etc.
49186   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49187   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49188   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49189 
49190   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49191   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49192   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49193 
49194   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49195   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49196   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49197 
49198   JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49199   JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49200   JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49201 
49202     fi
49203   fi
49204   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49205     JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49206     JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49207     JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49208   fi
49209 
49210   # Make compilation sanity check
49211   for ac_header in stdio.h
49212 do :
49213   ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
49214 if test "x$ac_cv_header_stdio_h" = xyes; then :
49215   cat >>confdefs.h <<_ACEOF
49216 #define HAVE_STDIO_H 1
49217 _ACEOF
49218 
49219 else
49220 
49221     { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
49222 $as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
49223     if test "x$COMPILE_TYPE" = xreduced; then
49224 
49225   # Print a helpful message on how to acquire the necessary build dependency.
49226   # reduced is the help tag: freetype, cups, alsa etc
49227   MISSING_DEPENDENCY=reduced
49228 
49229   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49230     cygwin_help $MISSING_DEPENDENCY
49231   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49232     msys_help $MISSING_DEPENDENCY
49233   else
49234     PKGHANDLER_COMMAND=
49235 
49236     case $PKGHANDLER in
49237       apt-get)
49238         apt_help     $MISSING_DEPENDENCY ;;
49239       yum)
49240         yum_help     $MISSING_DEPENDENCY ;;
49241       brew)
49242         brew_help    $MISSING_DEPENDENCY ;;
49243       port)
49244         port_help    $MISSING_DEPENDENCY ;;
49245       pkgutil)
49246         pkgutil_help $MISSING_DEPENDENCY ;;
49247       pkgadd)
49248         pkgadd_help  $MISSING_DEPENDENCY ;;
49249     esac
49250 
49251     if test "x$PKGHANDLER_COMMAND" != x; then
49252       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49253     fi
49254   fi
49255 
49256       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
49257 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
49258     elif test "x$COMPILE_TYPE" = xcross; then
49259       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
49260 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
49261     fi
49262     as_fn_error $? "Cannot continue." "$LINENO" 5
49263 
49264 fi
49265 
49266 done
49267 
49268 
49269   # The cast to long int works around a bug in the HP C Compiler
49270 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
49271 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
49272 # This bug is HP SR number 8606223364.
49273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
49274 $as_echo_n "checking size of int *... " >&6; }
49275 if ${ac_cv_sizeof_int_p+:} false; then :
49276   $as_echo_n "(cached) " >&6
49277 else
49278   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
49279 
49280 else
49281   if test "$ac_cv_type_int_p" = yes; then
49282      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49283 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49284 as_fn_error 77 "cannot compute sizeof (int *)
49285 See \`config.log' for more details" "$LINENO" 5; }
49286    else
49287      ac_cv_sizeof_int_p=0
49288    fi
49289 fi
49290 
49291 fi
49292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
49293 $as_echo "$ac_cv_sizeof_int_p" >&6; }
49294 
49295 
49296 
49297 cat >>confdefs.h <<_ACEOF
49298 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
49299 _ACEOF
49300 
49301 
49302 
49303   # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
49304   if test "x$ac_cv_sizeof_int_p" = x; then
49305     # The test failed, lets stick to the assumed value.
49306     { $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
49307 $as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
49308   else
49309     TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
49310 
49311     if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
49312       # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
49313       # Let's try to implicitely set the compilers target architecture and retry the test
49314       { $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
49315 $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;}
49316       { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
49317 $as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
49318 
49319   # When we add flags to the "official" CFLAGS etc, we need to
49320   # keep track of these additions in ADDED_CFLAGS etc. These
49321   # will later be checked to make sure only controlled additions
49322   # have been made to CFLAGS etc.
49323   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49324   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49325   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49326 
49327   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49328   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49329   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49330 
49331   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49332   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49333   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49334 
49335   JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49336   JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49337   JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49338 
49339 
49340       # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
49341       unset ac_cv_sizeof_int_p
49342       # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
49343       cat >>confdefs.h <<_ACEOF
49344 #undef SIZEOF_INT_P
49345 _ACEOF
49346 
49347       # The cast to long int works around a bug in the HP C Compiler
49348 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
49349 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
49350 # This bug is HP SR number 8606223364.
49351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
49352 $as_echo_n "checking size of int *... " >&6; }
49353 if ${ac_cv_sizeof_int_p+:} false; then :
49354   $as_echo_n "(cached) " >&6
49355 else
49356   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
49357 
49358 else
49359   if test "$ac_cv_type_int_p" = yes; then
49360      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49361 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49362 as_fn_error 77 "cannot compute sizeof (int *)
49363 See \`config.log' for more details" "$LINENO" 5; }
49364    else
49365      ac_cv_sizeof_int_p=0
49366    fi
49367 fi
49368 
49369 fi
49370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
49371 $as_echo "$ac_cv_sizeof_int_p" >&6; }
49372 
49373 
49374 
49375 cat >>confdefs.h <<_ACEOF
49376 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
49377 _ACEOF
49378 
49379 
49380 
49381       TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
49382 
49383       if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
49384         { $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
49385 $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;}
49386         if test "x$COMPILE_TYPE" = xreduced; then
49387 
49388   # Print a helpful message on how to acquire the necessary build dependency.
49389   # reduced is the help tag: freetype, cups, alsa etc
49390   MISSING_DEPENDENCY=reduced
49391 
49392   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49393     cygwin_help $MISSING_DEPENDENCY
49394   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49395     msys_help $MISSING_DEPENDENCY
49396   else
49397     PKGHANDLER_COMMAND=
49398 
49399     case $PKGHANDLER in
49400       apt-get)
49401         apt_help     $MISSING_DEPENDENCY ;;
49402       yum)
49403         yum_help     $MISSING_DEPENDENCY ;;
49404       brew)
49405         brew_help    $MISSING_DEPENDENCY ;;
49406       port)
49407         port_help    $MISSING_DEPENDENCY ;;
49408       pkgutil)
49409         pkgutil_help $MISSING_DEPENDENCY ;;
49410       pkgadd)
49411         pkgadd_help  $MISSING_DEPENDENCY ;;
49412     esac
49413 
49414     if test "x$PKGHANDLER_COMMAND" != x; then
49415       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49416     fi
49417   fi
49418 
49419           { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
49420 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
49421         elif test "x$COMPILE_TYPE" = xcross; then
49422           { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
49423 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
49424         fi
49425         as_fn_error $? "Cannot continue." "$LINENO" 5
49426       fi
49427     fi
49428   fi
49429 
49430   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
49431 $as_echo_n "checking for target address size... " >&6; }
49432   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
49433 $as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
49434 
49435 
49436   ###############################################################################
49437   #
49438   # Is the target little of big endian?
49439   #
49440    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
49441 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
49442 if ${ac_cv_c_bigendian+:} false; then :
49443   $as_echo_n "(cached) " >&6
49444 else
49445   ac_cv_c_bigendian=unknown
49446     # See if we're dealing with a universal compiler.
49447     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49448 /* end confdefs.h.  */
49449 #ifndef __APPLE_CC__
49450                not a universal capable compiler
49451              #endif
49452              typedef int dummy;
49453 
49454 _ACEOF
49455 if ac_fn_cxx_try_compile "$LINENO"; then :
49456 
49457         # Check for potential -arch flags.  It is not universal unless
49458         # there are at least two -arch flags with different values.
49459         ac_arch=
49460         ac_prev=
49461         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
49462          if test -n "$ac_prev"; then
49463            case $ac_word in
49464              i?86 | x86_64 | ppc | ppc64)
49465                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
49466                  ac_arch=$ac_word
49467                else
49468                  ac_cv_c_bigendian=universal
49469                  break
49470                fi
49471                ;;
49472            esac
49473            ac_prev=
49474          elif test "x$ac_word" = "x-arch"; then
49475            ac_prev=arch
49476          fi
49477        done
49478 fi
49479 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49480     if test $ac_cv_c_bigendian = unknown; then
49481       # See if sys/param.h defines the BYTE_ORDER macro.
49482       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49483 /* end confdefs.h.  */
49484 #include <sys/types.h>
49485              #include <sys/param.h>
49486 
49487 int
49488 main ()
49489 {
49490 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
49491                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
49492                      && LITTLE_ENDIAN)
49493               bogus endian macros
49494              #endif
49495 
49496   ;
49497   return 0;
49498 }
49499 _ACEOF
49500 if ac_fn_cxx_try_compile "$LINENO"; then :
49501   # It does; now see whether it defined to BIG_ENDIAN or not.
49502          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49503 /* end confdefs.h.  */
49504 #include <sys/types.h>
49505                 #include <sys/param.h>
49506 
49507 int
49508 main ()
49509 {
49510 #if BYTE_ORDER != BIG_ENDIAN
49511                  not big endian
49512                 #endif
49513 
49514   ;
49515   return 0;
49516 }
49517 _ACEOF
49518 if ac_fn_cxx_try_compile "$LINENO"; then :
49519   ac_cv_c_bigendian=yes
49520 else
49521   ac_cv_c_bigendian=no
49522 fi
49523 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49524 fi
49525 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49526     fi
49527     if test $ac_cv_c_bigendian = unknown; then
49528       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
49529       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49530 /* end confdefs.h.  */
49531 #include <limits.h>
49532 
49533 int
49534 main ()
49535 {
49536 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
49537               bogus endian macros
49538              #endif
49539 
49540   ;
49541   return 0;
49542 }
49543 _ACEOF
49544 if ac_fn_cxx_try_compile "$LINENO"; then :
49545   # It does; now see whether it defined to _BIG_ENDIAN or not.
49546          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49547 /* end confdefs.h.  */
49548 #include <limits.h>
49549 
49550 int
49551 main ()
49552 {
49553 #ifndef _BIG_ENDIAN
49554                  not big endian
49555                 #endif
49556 
49557   ;
49558   return 0;
49559 }
49560 _ACEOF
49561 if ac_fn_cxx_try_compile "$LINENO"; then :
49562   ac_cv_c_bigendian=yes
49563 else
49564   ac_cv_c_bigendian=no
49565 fi
49566 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49567 fi
49568 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49569     fi
49570     if test $ac_cv_c_bigendian = unknown; then
49571       # Compile a test program.
49572       if test "$cross_compiling" = yes; then :
49573   # Try to guess by grepping values from an object file.
49574          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49575 /* end confdefs.h.  */
49576 short int ascii_mm[] =
49577                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
49578                 short int ascii_ii[] =
49579                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
49580                 int use_ascii (int i) {
49581                   return ascii_mm[i] + ascii_ii[i];
49582                 }
49583                 short int ebcdic_ii[] =
49584                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
49585                 short int ebcdic_mm[] =
49586                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
49587                 int use_ebcdic (int i) {
49588                   return ebcdic_mm[i] + ebcdic_ii[i];
49589                 }
49590                 extern int foo;
49591 
49592 int
49593 main ()
49594 {
49595 return use_ascii (foo) == use_ebcdic (foo);
49596   ;
49597   return 0;
49598 }
49599 _ACEOF
49600 if ac_fn_cxx_try_compile "$LINENO"; then :
49601   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
49602               ac_cv_c_bigendian=yes
49603             fi
49604             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
49605               if test "$ac_cv_c_bigendian" = unknown; then
49606                 ac_cv_c_bigendian=no
49607               else
49608                 # finding both strings is unlikely to happen, but who knows?
49609                 ac_cv_c_bigendian=unknown
49610               fi
49611             fi
49612 fi
49613 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49614 else
49615   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49616 /* end confdefs.h.  */
49617 $ac_includes_default
49618 int
49619 main ()
49620 {
49621 
49622              /* Are we little or big endian?  From Harbison&Steele.  */
49623              union
49624              {
49625                long int l;
49626                char c[sizeof (long int)];
49627              } u;
49628              u.l = 1;
49629              return u.c[sizeof (long int) - 1] == 1;
49630 
49631   ;
49632   return 0;
49633 }
49634 _ACEOF
49635 if ac_fn_cxx_try_run "$LINENO"; then :
49636   ac_cv_c_bigendian=no
49637 else
49638   ac_cv_c_bigendian=yes
49639 fi
49640 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49641   conftest.$ac_objext conftest.beam conftest.$ac_ext
49642 fi
49643 
49644     fi
49645 fi
49646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
49647 $as_echo "$ac_cv_c_bigendian" >&6; }
49648  case $ac_cv_c_bigendian in #(
49649    yes)
49650      ENDIAN="big";; #(
49651    no)
49652      ENDIAN="little" ;; #(
49653    universal)
49654      ENDIAN="universal_endianness"
49655      ;; #(
49656    *)
49657      ENDIAN="unknown" ;;
49658  esac
49659 
49660 
49661   if test "x$ENDIAN" = xuniversal_endianness; then
49662     as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
49663   fi
49664   if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
49665     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
49666   fi
49667 
49668 
49669 # Configure flags for the tools
49670 
49671   ###############################################################################
49672   #
49673   # How to compile shared libraries.
49674   #
49675 
49676   if test "x$TOOLCHAIN_TYPE" = xgcc; then
49677     PICFLAG="-fPIC"
49678     C_FLAG_REORDER=''
49679     CXX_FLAG_REORDER=''
49680 
49681     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49682       # Linking is different on MacOSX
49683       if test "x$STATIC_BUILD" = xtrue; then
49684         SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
49685       else
49686         SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49687         JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49688       fi
49689       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$1'
49690       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49691       SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49692       SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49693     else
49694       # Default works for linux, might work on other platforms as well.
49695       SHARED_LIBRARY_FLAGS='-shared'
49696       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49697       SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49698       SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49699       SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49700     fi
49701   elif test "x$TOOLCHAIN_TYPE" = xclang; then
49702     C_FLAG_REORDER=''
49703     CXX_FLAG_REORDER=''
49704 
49705     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49706       # Linking is different on MacOSX
49707       PICFLAG=''
49708       SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49709       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$1'
49710       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49711       SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49712       SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49713 
49714       if test "x$STATIC_BUILD" = xfalse; then
49715         JVM_CFLAGS="$JVM_CFLAGS -fPIC"
49716       fi
49717     else
49718       # Default works for linux, might work on other platforms as well.
49719       PICFLAG='-fPIC'
49720       SHARED_LIBRARY_FLAGS='-shared'
49721       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49722       SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49723       SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49724 
49725       # arm specific settings
49726       if test "x$OPENJDK_TARGET_CPU" = "xarm"; then
49727         # '-Wl,-z,origin' isn't used on arm.
49728         SET_SHARED_LIBRARY_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
49729       else
49730         SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49731       fi
49732 
49733     fi
49734   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49735     if test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
49736       PICFLAG="-xcode=pic32"
49737     else
49738       PICFLAG="-KPIC"
49739     fi
49740     C_FLAG_REORDER='-xF'
49741     CXX_FLAG_REORDER='-xF'
49742     SHARED_LIBRARY_FLAGS="-G"
49743     SET_EXECUTABLE_ORIGIN='-R\$$ORIGIN$1'
49744     SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49745     SET_SHARED_LIBRARY_NAME='-h $1'
49746     SET_SHARED_LIBRARY_MAPFILE='-M$1'
49747   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49748     # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
49749     # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
49750     # will have to patch this single instruction with a call to some out-of-order code which
49751     # does the load from the TOC. This is of course slow. But in that case we also would have
49752     # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
49753     # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
49754     # can be patched directly by the linker and does not require a jump to out-of-order code.
49755     # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
49756     # instead. This creates a distinct TOC for every compilation unit (and thus requires two
49757     # loads for accessing a global variable). But there are rumors that this may be seen as a
49758     # 'performance feature' because of improved code locality of the symbols used in a
49759     # compilation unit.
49760     PICFLAG="-qpic"
49761     JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49762     C_FLAG_REORDER=''
49763     CXX_FLAG_REORDER=''
49764     SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
49765     SET_EXECUTABLE_ORIGIN=""
49766     SET_SHARED_LIBRARY_ORIGIN=''
49767     SET_SHARED_LIBRARY_NAME=''
49768     SET_SHARED_LIBRARY_MAPFILE=''
49769   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49770     PICFLAG=""
49771     C_FLAG_REORDER=''
49772     CXX_FLAG_REORDER=''
49773     SHARED_LIBRARY_FLAGS="-dll"
49774     SET_EXECUTABLE_ORIGIN=''
49775     SET_SHARED_LIBRARY_ORIGIN=''
49776     SET_SHARED_LIBRARY_NAME=''
49777     SET_SHARED_LIBRARY_MAPFILE='-def:$1'
49778   fi
49779 
49780 
49781 
49782 
49783 
49784 
49785 
49786 
49787 
49788   # The (cross) compiler is now configured, we can now test capabilities
49789   # of the target platform.
49790 
49791 
49792 
49793   ###############################################################################
49794   #
49795   # Setup the opt flags for different compilers
49796   # and different operating systems.
49797   #
49798 
49799   # FIXME: this was indirectly the old default, but just inherited.
49800   # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49801   #   C_FLAG_DEPS="-MMD -MF"
49802   # fi
49803 
49804   # Generate make dependency files
49805   if test "x$TOOLCHAIN_TYPE" = xgcc; then
49806     C_FLAG_DEPS="-MMD -MF"
49807   elif test "x$TOOLCHAIN_TYPE" = xclang; then
49808     C_FLAG_DEPS="-MMD -MF"
49809   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49810     C_FLAG_DEPS="-xMMD -xMF"
49811   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49812     C_FLAG_DEPS="-qmakedep=gcc -MF"
49813   fi
49814   CXX_FLAG_DEPS="$C_FLAG_DEPS"
49815 
49816 
49817 
49818   # Debug symbols
49819   if test "x$TOOLCHAIN_TYPE" = xgcc; then
49820     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
49821       # reduce from default "-g2" option to save space
49822       CFLAGS_DEBUG_SYMBOLS="-g1"
49823       CXXFLAGS_DEBUG_SYMBOLS="-g1"
49824     else
49825       CFLAGS_DEBUG_SYMBOLS="-g"
49826       CXXFLAGS_DEBUG_SYMBOLS="-g"
49827     fi
49828   elif test "x$TOOLCHAIN_TYPE" = xclang; then
49829     CFLAGS_DEBUG_SYMBOLS="-g"
49830     CXXFLAGS_DEBUG_SYMBOLS="-g"
49831   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49832     CFLAGS_DEBUG_SYMBOLS="-g -xs"
49833     # -g0 enables debug symbols without disabling inlining.
49834     CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
49835   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49836     CFLAGS_DEBUG_SYMBOLS="-g"
49837     CXXFLAGS_DEBUG_SYMBOLS="-g"
49838   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49839     CFLAGS_DEBUG_SYMBOLS="-Zi"
49840     CXXFLAGS_DEBUG_SYMBOLS="-Zi"
49841   fi
49842 
49843 
49844 
49845   # Debug symbols for JVM_CFLAGS
49846   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49847     JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
49848     if test "x$DEBUG_LEVEL" = xslowdebug; then
49849       JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49850     else
49851       # -g0 does not disable inlining, which -g does.
49852       JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
49853     fi
49854   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49855     JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
49856   else
49857     JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49858   fi
49859 
49860 
49861   # bounds, memory and behavior checking options
49862   if test "x$TOOLCHAIN_TYPE" = xgcc; then
49863     case $DEBUG_LEVEL in
49864     release )
49865       # no adjustment
49866       ;;
49867     fastdebug )
49868       # no adjustment
49869       ;;
49870     slowdebug )
49871       # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
49872       # get's added conditionally on whether we produce debug symbols or not.
49873       # This is most likely not really correct.
49874 
49875       # Add runtime stack smashing and undefined behavior checks.
49876       # Not all versions of gcc support -fstack-protector
49877       STACK_PROTECTOR_CFLAG="-fstack-protector-all"
49878 
49879 
49880 
49881 
49882 
49883 
49884 
49885 
49886 
49887 
49888 
49889 
49890 
49891 
49892 
49893 
49894 
49895 
49896 
49897 
49898 
49899 
49900 
49901 
49902 
49903 
49904 
49905 
49906 
49907 
49908 
49909 
49910 
49911 
49912 
49913 
49914 
49915 
49916 
49917 
49918 
49919 
49920     # Execute function body
49921 
49922 
49923 
49924 
49925 
49926 
49927 
49928 
49929 
49930 
49931 
49932 
49933 
49934 
49935 
49936 
49937 
49938 
49939 
49940 
49941 
49942 
49943 
49944 
49945 
49946 
49947 
49948 
49949 
49950 
49951 
49952 
49953 
49954 
49955 
49956 
49957 
49958 
49959 
49960 
49961 
49962 
49963 
49964 
49965 
49966 
49967 
49968 
49969     # Execute function body
49970 
49971   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49972 $as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49973   supports=yes
49974 
49975   saved_cflags="$CFLAGS"
49976   CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
49977   ac_ext=c
49978 ac_cpp='$CPP $CPPFLAGS'
49979 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49980 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49981 ac_compiler_gnu=$ac_cv_c_compiler_gnu
49982 
49983   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49984 /* end confdefs.h.  */
49985 int i;
49986 _ACEOF
49987 if ac_fn_c_try_compile "$LINENO"; then :
49988 
49989 else
49990   supports=no
49991 fi
49992 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49993   ac_ext=cpp
49994 ac_cpp='$CXXCPP $CPPFLAGS'
49995 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49996 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49997 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49998 
49999   CFLAGS="$saved_cflags"
50000 
50001   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50002 $as_echo "$supports" >&6; }
50003   if test "x$supports" = "xyes" ; then
50004     :
50005     C_COMP_SUPPORTS="yes"
50006   else
50007     :
50008     C_COMP_SUPPORTS="no"
50009   fi
50010 
50011 
50012 
50013 
50014 
50015 
50016 
50017 
50018 
50019 
50020 
50021 
50022 
50023 
50024 
50025 
50026 
50027 
50028 
50029 
50030 
50031 
50032 
50033 
50034 
50035 
50036 
50037 
50038 
50039 
50040 
50041 
50042 
50043 
50044 
50045 
50046 
50047 
50048 
50049 
50050 
50051 
50052 
50053 
50054 
50055 
50056 
50057 
50058 
50059 
50060 
50061 
50062 
50063 
50064 
50065 
50066 
50067 
50068 
50069     # Execute function body
50070 
50071   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50072 $as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50073   supports=yes
50074 
50075   saved_cxxflags="$CXXFLAGS"
50076   CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
50077   ac_ext=cpp
50078 ac_cpp='$CXXCPP $CPPFLAGS'
50079 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50080 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50081 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50082 
50083   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50084 /* end confdefs.h.  */
50085 int i;
50086 _ACEOF
50087 if ac_fn_cxx_try_compile "$LINENO"; then :
50088 
50089 else
50090   supports=no
50091 fi
50092 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50093   ac_ext=cpp
50094 ac_cpp='$CXXCPP $CPPFLAGS'
50095 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50096 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50097 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50098 
50099   CXXFLAGS="$saved_cxxflags"
50100 
50101   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50102 $as_echo "$supports" >&6; }
50103   if test "x$supports" = "xyes" ; then
50104     :
50105     CXX_COMP_SUPPORTS="yes"
50106   else
50107     :
50108     CXX_COMP_SUPPORTS="no"
50109   fi
50110 
50111 
50112 
50113 
50114 
50115 
50116 
50117 
50118 
50119 
50120 
50121 
50122 
50123   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50124 $as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50125   supports=no
50126   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
50127 
50128   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50129 $as_echo "$supports" >&6; }
50130   if test "x$supports" = "xyes" ; then
50131     :
50132 
50133   else
50134     :
50135     STACK_PROTECTOR_CFLAG=""
50136   fi
50137 
50138 
50139 
50140 
50141 
50142 
50143 
50144       CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50145       CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50146       if test "x$STACK_PROTECTOR_CFLAG" != x; then
50147         JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50148       fi
50149       ;;
50150     esac
50151   fi
50152 
50153   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50154     if test "x$DEBUG_LEVEL" != xrelease; then
50155       if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50156         JVM_CFLAGS="$JVM_CFLAGS -homeparams"
50157       fi
50158     fi
50159   fi
50160 
50161   # Optimization levels
50162   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50163     CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
50164 
50165     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
50166       # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
50167       C_O_FLAG_HIGHEST_JVM="-xO4"
50168       C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
50169       C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
50170       C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
50171       C_O_FLAG_DEBUG="-xregs=no%frameptr"
50172       C_O_FLAG_DEBUG_JVM=""
50173       C_O_FLAG_NONE="-xregs=no%frameptr"
50174       CXX_O_FLAG_HIGHEST_JVM="-xO4"
50175       CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
50176       CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
50177       CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
50178       CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
50179       CXX_O_FLAG_DEBUG_JVM=""
50180       CXX_O_FLAG_NONE="-xregs=no%frameptr"
50181       if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50182         C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
50183         CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
50184       fi
50185     elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50186       C_O_FLAG_HIGHEST_JVM="-xO4"
50187       C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
50188       C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
50189       C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
50190       C_O_FLAG_DEBUG=""
50191       C_O_FLAG_DEBUG_JVM=""
50192       C_O_FLAG_NONE=""
50193       CXX_O_FLAG_HIGHEST_JVM="-xO4"
50194       CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
50195       CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
50196       CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
50197       CXX_O_FLAG_DEBUG=""
50198       CXX_O_FLAG_DEBUG_JVM=""
50199       CXX_O_FLAG_NONE=""
50200     fi
50201   else
50202     # The remaining toolchains share opt flags between CC and CXX;
50203     # setup for C and duplicate afterwards.
50204     if test "x$TOOLCHAIN_TYPE" = xgcc; then
50205       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50206         # On MacOSX we optimize for size, something
50207         # we should do for all platforms?
50208         C_O_FLAG_HIGHEST_JVM="-Os"
50209         C_O_FLAG_HIGHEST="-Os"
50210         C_O_FLAG_HI="-Os"
50211         C_O_FLAG_NORM="-Os"
50212         C_O_FLAG_SIZE="-Os"
50213       else
50214         C_O_FLAG_HIGHEST_JVM="-O3"
50215         C_O_FLAG_HIGHEST="-O3"
50216         C_O_FLAG_HI="-O3"
50217         C_O_FLAG_NORM="-O2"
50218         C_O_FLAG_SIZE="-Os"
50219       fi
50220       C_O_FLAG_DEBUG="-O0"
50221       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50222         C_O_FLAG_DEBUG_JVM=""
50223       elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50224         C_O_FLAG_DEBUG_JVM="-O0"
50225       fi
50226       C_O_FLAG_NONE="-O0"
50227     elif test "x$TOOLCHAIN_TYPE" = xclang; then
50228       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50229         # On MacOSX we optimize for size, something
50230         # we should do for all platforms?
50231         C_O_FLAG_HIGHEST_JVM="-Os"
50232         C_O_FLAG_HIGHEST="-Os"
50233         C_O_FLAG_HI="-Os"
50234         C_O_FLAG_NORM="-Os"
50235         C_O_FLAG_SIZE="-Os"
50236       else
50237         C_O_FLAG_HIGHEST_JVM="-O3"
50238         C_O_FLAG_HIGHEST="-O3"
50239         C_O_FLAG_HI="-O3"
50240         C_O_FLAG_NORM="-O2"
50241         C_O_FLAG_SIZE="-Os"
50242       fi
50243       C_O_FLAG_DEBUG="-O0"
50244       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50245         C_O_FLAG_DEBUG_JVM=""
50246       elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50247         C_O_FLAG_DEBUG_JVM="-O0"
50248       fi
50249       C_O_FLAG_NONE="-O0"
50250     elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50251       C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
50252       C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
50253       C_O_FLAG_HI="-O3 -qinline -qinlglue"
50254       C_O_FLAG_NORM="-O2"
50255       C_O_FLAG_DEBUG="-qnoopt"
50256       # FIXME: Value below not verified.
50257       C_O_FLAG_DEBUG_JVM=""
50258       C_O_FLAG_NONE="-qnoopt"
50259     elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50260       C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
50261       C_O_FLAG_HIGHEST="-O2"
50262       C_O_FLAG_HI="-O1"
50263       C_O_FLAG_NORM="-O1"
50264       C_O_FLAG_DEBUG="-Od"
50265       C_O_FLAG_DEBUG_JVM=""
50266       C_O_FLAG_NONE="-Od"
50267       C_O_FLAG_SIZE="-Os"
50268     fi
50269     CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
50270     CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
50271     CXX_O_FLAG_HI="$C_O_FLAG_HI"
50272     CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
50273     CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
50274     CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
50275     CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
50276     CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
50277   fi
50278 
50279   # Adjust optimization flags according to debug level.
50280   case $DEBUG_LEVEL in
50281     release )
50282       # no adjustment
50283       ;;
50284     fastdebug )
50285       # Not quite so much optimization
50286       C_O_FLAG_HI="$C_O_FLAG_NORM"
50287       CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
50288       ;;
50289     slowdebug )
50290       # Disable optimization
50291       C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
50292       C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
50293       C_O_FLAG_HI="$C_O_FLAG_DEBUG"
50294       C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
50295       C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
50296       CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
50297       CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
50298       CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
50299       CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
50300       CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
50301       ;;
50302   esac
50303 
50304 
50305 
50306 
50307 
50308 
50309 
50310 
50311 
50312 
50313 
50314 
50315 
50316 
50317 
50318 
50319 
50320 
50321 
50322 
50323 # Check whether --with-abi-profile was given.
50324 if test "${with_abi_profile+set}" = set; then :
50325   withval=$with_abi_profile;
50326 fi
50327 
50328 
50329   if test "x$with_abi_profile" != x; then
50330     if test "x$OPENJDK_TARGET_CPU" != xarm && \
50331         test "x$OPENJDK_TARGET_CPU" != xaarch64; then
50332       as_fn_error $? "--with-abi-profile only available on arm/aarch64" "$LINENO" 5
50333     fi
50334 
50335     OPENJDK_TARGET_ABI_PROFILE=$with_abi_profile
50336     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI profle" >&5
50337 $as_echo_n "checking for ABI profle... " >&6; }
50338     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_ABI_PROFILE" >&5
50339 $as_echo "$OPENJDK_TARGET_ABI_PROFILE" >&6; }
50340 
50341     if test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-sflt; then
50342       ARM_FLOAT_TYPE=vfp-sflt
50343       ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
50344     elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-hflt; then
50345       ARM_FLOAT_TYPE=vfp-hflt
50346       ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
50347     elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-sflt; then
50348       ARM_FLOAT_TYPE=sflt
50349       ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
50350     elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv5-vfp-sflt; then
50351       ARM_FLOAT_TYPE=vfp-sflt
50352       ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
50353     elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv6-vfp-hflt; then
50354       ARM_FLOAT_TYPE=vfp-hflt
50355       ARM_ARCH_TYPE_FLAGS='-march=armv6 -marm'
50356     elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm64; then
50357       # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
50358       ARM_FLOAT_TYPE=
50359       ARM_ARCH_TYPE_FLAGS=
50360     elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xaarch64; then
50361       # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
50362       ARM_FLOAT_TYPE=
50363       ARM_ARCH_TYPE_FLAGS=
50364     else
50365       as_fn_error $? "Invalid ABI profile: \"$OPENJDK_TARGET_ABI_PROFILE\"" "$LINENO" 5
50366     fi
50367 
50368     if test "x$ARM_FLOAT_TYPE" = xvfp-sflt; then
50369       ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=softfp -mfpu=vfp -DFLOAT_ARCH=-vfp-sflt'
50370     elif test "x$ARM_FLOAT_TYPE" = xvfp-hflt; then
50371       ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=hard -mfpu=vfp -DFLOAT_ARCH=-vfp-hflt'
50372     elif test "x$ARM_FLOAT_TYPE" = xsflt; then
50373       ARM_FLOAT_TYPE_FLAGS='-msoft-float -mfpu=vfp'
50374     fi
50375     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ARM_FLOAT_TYPE floating point flags" >&5
50376 $as_echo_n "checking for $ARM_FLOAT_TYPE floating point flags... " >&6; }
50377     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_FLOAT_TYPE_FLAGS" >&5
50378 $as_echo "$ARM_FLOAT_TYPE_FLAGS" >&6; }
50379 
50380     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for arch type flags" >&5
50381 $as_echo_n "checking for arch type flags... " >&6; }
50382     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_ARCH_TYPE_FLAGS" >&5
50383 $as_echo "$ARM_ARCH_TYPE_FLAGS" >&6; }
50384 
50385     # Now set JDK_ARCH_ABI_PROP_NAME. This is equivalent to the last part of the
50386     # autoconf target triplet.
50387      JDK_ARCH_ABI_PROP_NAME=`$ECHO $OPENJDK_TARGET_AUTOCONF_NAME | $SED -e 's/.*-\([^-]*\)$/\1/'`
50388     # Sanity check that it is a known ABI.
50389     if test "x$JDK_ARCH_ABI_PROP_NAME" != xgnu && \
50390         test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabi  && \
50391         test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabihf; then
50392           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&5
50393 $as_echo "$as_me: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&2;}
50394     fi
50395     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI property name" >&5
50396 $as_echo_n "checking for ABI property name... " >&6; }
50397     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_ARCH_ABI_PROP_NAME" >&5
50398 $as_echo "$JDK_ARCH_ABI_PROP_NAME" >&6; }
50399 
50400 
50401     # Pass these on to the open part of configure as if they were set using
50402     # --with-extra-c[xx]flags.
50403     EXTRA_CFLAGS="$EXTRA_CFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
50404     EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
50405     # Get rid of annoying "note: the mangling of 'va_list' has changed in GCC 4.4"
50406     # FIXME: This should not really be set using extra_cflags.
50407     if test "x$OPENJDK_TARGET_CPU" = xarm; then
50408         EXTRA_CFLAGS="$EXTRA_CFLAGS -Wno-psabi"
50409         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -Wno-psabi"
50410     fi
50411     # Also add JDK_ARCH_ABI_PROP_NAME define, but only to CFLAGS.
50412     EXTRA_CFLAGS="$EXTRA_CFLAGS -DJDK_ARCH_ABI_PROP_NAME='\"\$(JDK_ARCH_ABI_PROP_NAME)\"'"
50413     # And pass the architecture flags to the linker as well
50414     EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
50415   fi
50416 
50417   # When building with an abi profile, the name of that profile is appended on the
50418   # bundle platform, which is used in bundle names.
50419   if test "x$OPENJDK_TARGET_ABI_PROFILE" != x; then
50420     OPENJDK_TARGET_BUNDLE_PLATFORM="$OPENJDK_TARGET_OS_BUNDLE-$OPENJDK_TARGET_ABI_PROFILE"
50421   fi
50422 
50423 
50424   # Special extras...
50425   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50426     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50427       CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50428       CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50429     fi
50430     CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50431     CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50432   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50433     CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50434     CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50435   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50436     CXXSTD_CXXFLAG="-std=gnu++98"
50437 
50438 
50439 
50440 
50441 
50442 
50443 
50444 
50445 
50446 
50447 
50448 
50449 
50450 
50451 
50452 
50453 
50454 
50455 
50456 
50457 
50458 
50459 
50460 
50461 
50462 
50463 
50464 
50465 
50466 
50467 
50468 
50469 
50470 
50471 
50472 
50473 
50474 
50475 
50476 
50477 
50478 
50479     # Execute function body
50480 
50481   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
50482 $as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
50483   supports=yes
50484 
50485   saved_cxxflags="$CXXFLAGS"
50486   CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
50487   ac_ext=cpp
50488 ac_cpp='$CXXCPP $CPPFLAGS'
50489 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50490 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50491 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50492 
50493   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50494 /* end confdefs.h.  */
50495 int i;
50496 _ACEOF
50497 if ac_fn_cxx_try_compile "$LINENO"; then :
50498 
50499 else
50500   supports=no
50501 fi
50502 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50503   ac_ext=cpp
50504 ac_cpp='$CXXCPP $CPPFLAGS'
50505 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50506 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50507 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50508 
50509   CXXFLAGS="$saved_cxxflags"
50510 
50511   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50512 $as_echo "$supports" >&6; }
50513   if test "x$supports" = "xyes" ; then
50514     :
50515 
50516   else
50517     :
50518     CXXSTD_CXXFLAG=""
50519   fi
50520 
50521 
50522 
50523 
50524 
50525 
50526 
50527 
50528 
50529 
50530 
50531 
50532     CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
50533     JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
50534 
50535   fi
50536   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50537     CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
50538     CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
50539   fi
50540 
50541   CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
50542   CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
50543   LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
50544 
50545   ###############################################################################
50546   #
50547   # Now setup the CFLAGS and LDFLAGS for the JDK build.
50548   # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
50549   #
50550 
50551   # Setup compiler/platform specific flags into
50552   #    CFLAGS_JDK    - C Compiler flags
50553   #    CXXFLAGS_JDK  - C++ Compiler flags
50554   #    COMMON_CCXXFLAGS_JDK - common to C and C++
50555   if test "x$TOOLCHAIN_TYPE" = xgcc; then
50556     JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
50557     JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
50558     JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
50559     if test "x$OPENJDK_TARGET_CPU" = xx86; then
50560       # Force compatibility with i586 on 32 bit intel platforms.
50561       COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
50562       JVM_CFLAGS="$JVM_CFLAGS -march=i586"
50563     fi
50564     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50565         -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50566     case $OPENJDK_TARGET_CPU_ARCH in
50567       arm )
50568         # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50569         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50570         COMMON_CCXXFLAGS_JDK="${COMMON_CCXXFLAGS_JDK} -fsigned-char"
50571         ;;
50572       ppc )
50573         # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50574         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50575         ;;
50576       s390 )
50577         COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
50578         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50579         ;;
50580       * )
50581         COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50582         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50583         ;;
50584     esac
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 
50611 
50612 
50613 
50614 
50615 
50616 
50617 
50618 
50619 
50620 
50621 
50622 
50623 
50624 
50625 
50626 
50627 
50628 
50629 
50630 
50631 
50632 
50633 
50634 
50635 
50636 
50637 
50638 
50639     # Execute function body
50640 
50641   # Need to assign to a variable since m4 is blocked from modifying parts in [].
50642   REFERENCE_VERSION=6
50643 
50644   if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50645     as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50646   fi
50647 
50648   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50649     as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50650   fi
50651 
50652   # Version comparison method inspired by http://stackoverflow.com/a/24067243
50653   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50654 
50655   if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50656     :
50657 
50658   # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
50659   # runs afoul of the more aggressive versions of these optimisations.
50660   # Notably, value range propagation now assumes that the this pointer of C++
50661   # member functions is non-null.
50662   NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
50663         NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
50664         { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
50665 $as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
50666   CFLAGS_JDK="$CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50667   JVM_CFLAGS="$JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50668 
50669   else
50670     :
50671 
50672   fi
50673 
50674 
50675 
50676 
50677 
50678 
50679 
50680 
50681 
50682 
50683 
50684 
50685 
50686 
50687   elif test "x$TOOLCHAIN_TYPE" = xclang; then
50688     JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
50689 
50690     # Restrict the debug information created by Clang to avoid
50691     # too big object files and speed the build up a little bit
50692     # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50693     JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
50694     if test "x$OPENJDK_TARGET_OS" = xlinux; then
50695       if test "x$OPENJDK_TARGET_CPU" = xx86; then
50696         # Force compatibility with i586 on 32 bit intel platforms.
50697         COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
50698         JVM_CFLAGS="$JVM_CFLAGS -march=i586"
50699       fi
50700       JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
50701       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50702           -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50703       case $OPENJDK_TARGET_CPU_ARCH in
50704         ppc )
50705           # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50706           CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50707           ;;
50708         * )
50709           COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50710           CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50711           ;;
50712       esac
50713     fi
50714   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50715     JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
50716     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50717     if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
50718       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
50719     fi
50720 
50721     CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50722     CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50723   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50724     JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50725     CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50726     CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50727   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50728     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
50729         -MD -Zc:wchar_t- -W3 -wd4800 \
50730         -DWIN32_LEAN_AND_MEAN \
50731         -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50732         -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50733         -DWIN32 -DIAL"
50734     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50735       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50736     else
50737       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50738     fi
50739     # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50740     # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50741     # studio.
50742     if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50743       STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50744       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50745       JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50746     fi
50747   fi
50748 
50749   ###############################################################################
50750 
50751   # Adjust flags according to debug level.
50752   case $DEBUG_LEVEL in
50753     fastdebug | slowdebug )
50754       CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50755       CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50756       ;;
50757     release )
50758       ;;
50759     * )
50760       as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50761       ;;
50762   esac
50763 
50764   # Set some common defines. These works for all compilers, but assume
50765   # -D is universally accepted.
50766 
50767   # Setup endianness
50768   if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50769     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50770     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50771     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50772     #   Note: -Dmacro         is the same as    #define macro 1
50773     #         -Dmacro=        is the same as    #define macro
50774     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50775       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50776     else
50777       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50778     fi
50779   else
50780     # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50781     # are defined in the system?
50782     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50783       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50784     else
50785       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50786     fi
50787   fi
50788 
50789   # Setup target OS define. Use OS target name but in upper case.
50790   OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50791   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
50792 
50793   # Setup target CPU
50794   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50795       $OPENJDK_TARGET_ADD_LP64 \
50796       -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
50797 
50798   # Setup debug/release defines
50799   if test "x$DEBUG_LEVEL" = xrelease; then
50800     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
50801     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50802       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
50803     fi
50804   else
50805     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
50806   fi
50807 
50808   # Set some additional per-OS defines.
50809   if test "x$OPENJDK_TARGET_OS" = xlinux; then
50810     JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
50811     JVM_CFLAGS="$JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
50812         -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50813   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50814     JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
50815     JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
50816         -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
50817   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50818     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50819     JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
50820     JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50821     JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50822         -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50823         -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50824         -fno-omit-frame-pointer"
50825   elif test "x$OPENJDK_TARGET_OS" = xaix; then
50826     JVM_CFLAGS="$JVM_CFLAGS -DAIX"
50827     # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50828     JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
50829         -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50830         -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50831   elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50832     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50833   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50834     JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50835     JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
50836   fi
50837 
50838   # Set some additional per-CPU defines.
50839   if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
50840     JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
50841   elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50842     JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
50843   elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
50844     if test "x$OPENJDK_TARGET_OS" = xlinux; then
50845       JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50846       # fixes `relocation truncated to fit' error for gcc 4.1.
50847       JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
50848       # Use ppc64 instructions, but schedule for power5
50849       JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50850     elif test "x$OPENJDK_TARGET_OS" = xaix; then
50851       JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
50852     fi
50853   elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
50854     if test "x$OPENJDK_TARGET_OS" = xlinux; then
50855       JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50856       # Little endian machine uses ELFv2 ABI.
50857       JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
50858       # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50859       JVM_CFLAGS="$JVM_CFLAGS -mcpu=power8 -mtune=power8"
50860     fi
50861   elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
50862     if test "x$OPENJDK_TARGET_OS" = xlinux; then
50863       JVM_CFLAGS="$JVM_CFLAGS -mbackchain -march=z10"
50864     fi
50865   fi
50866 
50867   if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50868     JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50869   fi
50870 
50871   if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50872     if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
50873       # Solaris does not have _LP64=1 in the old build.
50874       # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50875       JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
50876     fi
50877   fi
50878 
50879   # Set JVM_CFLAGS warning handling
50880   if test "x$OPENJDK_TARGET_OS" = xlinux; then
50881     JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50882         -Wunused-value -Woverloaded-virtual"
50883 
50884     if test "x$TOOLCHAIN_TYPE" = xgcc; then
50885 
50886 
50887 
50888 
50889 
50890 
50891 
50892 
50893 
50894 
50895 
50896 
50897 
50898 
50899 
50900 
50901 
50902 
50903 
50904 
50905 
50906 
50907 
50908 
50909 
50910 
50911 
50912 
50913 
50914 
50915 
50916 
50917 
50918 
50919 
50920 
50921 
50922 
50923 
50924 
50925 
50926 
50927 
50928 
50929 
50930 
50931 
50932 
50933 
50934 
50935 
50936 
50937 
50938 
50939     # Execute function body
50940 
50941   # Need to assign to a variable since m4 is blocked from modifying parts in [].
50942   REFERENCE_VERSION=4.8
50943 
50944   if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50945     as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50946   fi
50947 
50948   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50949     as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50950   fi
50951 
50952   # Version comparison method inspired by http://stackoverflow.com/a/24067243
50953   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50954 
50955   if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50956     :
50957 
50958             # These flags either do not work or give spurious warnings prior to gcc 4.8.
50959             JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50960 
50961 
50962   else
50963     :
50964 
50965   fi
50966 
50967 
50968 
50969 
50970 
50971 
50972 
50973 
50974 
50975 
50976 
50977 
50978 
50979 
50980     fi
50981     if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
50982       # Non-zero builds have stricter warnings
50983       JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
50984     else
50985       if test "x$TOOLCHAIN_TYPE" = xclang; then
50986         # Some versions of llvm do not like -Wundef
50987         JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
50988       fi
50989     fi
50990   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50991     JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
50992         -Wsign-compare -Wundef -Wunused-function -Wformat=2"
50993   fi
50994 
50995   # Additional macosx handling
50996   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50997     # Setting these parameters makes it an error to link to macosx APIs that are
50998     # newer than the given OS version and makes the linked binaries compatible
50999     # even if built on a newer version of the OS.
51000     # The expected format is X.Y.Z
51001     MACOSX_VERSION_MIN=10.7.0
51002 
51003 
51004     # The macro takes the version with no dots, ex: 1070
51005     # Let the flags variables get resolved in make for easier override on make
51006     # command line.
51007     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51008     LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51009   fi
51010 
51011   # Setup some hard coded includes
51012   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
51013       -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
51014       -I${JDK_TOPDIR}/src/java.base/share/native/include \
51015       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
51016       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
51017       -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51018       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
51019 
51020   # The shared libraries are compiled using the picflag.
51021   CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
51022       $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51023   CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
51024       $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51025 
51026   # Executable flags
51027   CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
51028   CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
51029 
51030 
51031 
51032 
51033 
51034 
51035   # Setup LDFLAGS et al.
51036   #
51037 
51038   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51039     LDFLAGS_MICROSOFT="-nologo -opt:ref"
51040     LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51041     JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51042     if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
51043       LDFLAGS_SAFESH="-safeseh"
51044       LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
51045       JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
51046       # NOTE: Old build added -machine. Probably not needed.
51047       JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
51048     else
51049       JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
51050     fi
51051   elif test "x$TOOLCHAIN_TYPE" = xclang; then
51052       JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51053       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51054         # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51055         JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51056     fi
51057   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51058     # If this is a --hash-style=gnu system, use --hash-style=both, why?
51059     # We have previously set HAS_GNU_HASH if this is the case
51060     if test -n "$HAS_GNU_HASH"; then
51061       LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51062       LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
51063       JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
51064     fi
51065       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51066         JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51067     fi
51068     if test "x$OPENJDK_TARGET_OS" = xlinux; then
51069       # And since we now know that the linker is gnu, then add -z defs, to forbid
51070       # undefined symbols in object files.
51071       LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51072       LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51073       JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51074       LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51075       JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51076       if test "x$OPENJDK_TARGET_CPU" = xx86; then
51077         JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
51078       fi
51079       case $DEBUG_LEVEL in
51080         release )
51081           # tell linker to optimize libraries.
51082           # Should this be supplied to the OSS linker as well?
51083           LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51084           LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51085           JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51086           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51087             JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51088           fi
51089           ;;
51090         slowdebug )
51091           # Hotspot always let the linker optimize
51092           JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
51093           if test "x$HAS_LINKER_NOW" = "xtrue"; then
51094             # do relocations at load
51095             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
51096             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51097             JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
51098           fi
51099           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51100             # mark relocations read only
51101             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
51102             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51103             JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51104           fi
51105           ;;
51106         fastdebug )
51107           # Hotspot always let the linker optimize
51108           JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
51109           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51110             # mark relocations read only
51111             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
51112             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51113             JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51114           fi
51115           ;;
51116         * )
51117           as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51118           ;;
51119         esac
51120     fi
51121   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51122     LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51123     LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
51124     LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51125     LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51126     JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51127     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
51128       JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
51129     fi
51130   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51131     LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51132     LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
51133     JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
51134   fi
51135 
51136   # Customize LDFLAGS for executables
51137 
51138   LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
51139 
51140   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51141     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
51142       LDFLAGS_STACK_SIZE=1048576
51143     else
51144       LDFLAGS_STACK_SIZE=327680
51145     fi
51146     LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51147   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
51148     LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51149   fi
51150 
51151   LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
51152 
51153   # Customize LDFLAGS for libs
51154   LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
51155 
51156   LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51157   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51158     JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51159         -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51160     JDKLIB_LIBS=""
51161   else
51162     JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51163         -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
51164 
51165     if test "xTARGET" = "xTARGET"; then
51166       # On some platforms (mac) the linker warns about non existing -L dirs.
51167       # For any of the variants server, client or minimal, the dir matches the
51168       # variant name. The "main" variant should be used for linking. For the
51169       # rest, the dir is just server.
51170       if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
51171           ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51172         JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51173             -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
51174       else
51175         JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51176             -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51177       fi
51178     elif test "xTARGET" = "xBUILD"; then
51179       # When building a buildjdk, it's always only the server variant
51180       JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51181           -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51182     fi
51183 
51184     JDKLIB_LIBS="-ljava -ljvm"
51185     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51186       JDKLIB_LIBS="$JDKLIB_LIBS -lc"
51187     fi
51188 
51189   fi
51190 
51191 LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
51192 
51193   # Set JVM_LIBS (per os)
51194   if test "x$OPENJDK_TARGET_OS" = xlinux; then
51195     JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
51196   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
51197     # FIXME: This hard-coded path is not really proper.
51198     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
51199       SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
51200     elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
51201       SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
51202     fi
51203     JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51204         -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51205   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51206     JVM_LIBS="$JVM_LIBS -lm"
51207   elif test "x$OPENJDK_TARGET_OS" = xaix; then
51208     JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51209   elif test "x$OPENJDK_TARGET_OS" = xbsd; then
51210     JVM_LIBS="$JVM_LIBS -lm"
51211   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
51212     JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51213         comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51214         wsock32.lib winmm.lib version.lib psapi.lib"
51215     fi
51216 
51217   # Set JVM_ASFLAGS
51218   if test "x$OPENJDK_TARGET_OS" = xlinux; then
51219     if test "x$OPENJDK_TARGET_CPU" = xx86; then
51220       JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
51221     fi
51222   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51223     JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51224   fi
51225 
51226   LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
51227 
51228 
51229 
51230 
51231 
51232 
51233 
51234 
51235 
51236 
51237 
51238 
51239 
51240 
51241 
51242   # Special extras...
51243   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51244     if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51245       OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51246       OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51247     fi
51248     OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51249     OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51250   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51251     OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51252     OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51253   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51254     OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
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 
51281 
51282 
51283 
51284 
51285 
51286 
51287 
51288 
51289 
51290 
51291 
51292 
51293 
51294 
51295 
51296 
51297     # Execute function body
51298 
51299   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
51300 $as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
51301   supports=yes
51302 
51303   saved_cxxflags="$CXXFLAGS"
51304   CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
51305   ac_ext=cpp
51306 ac_cpp='$CXXCPP $CPPFLAGS'
51307 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51308 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51309 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51310 
51311   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51312 /* end confdefs.h.  */
51313 int i;
51314 _ACEOF
51315 if ac_fn_cxx_try_compile "$LINENO"; then :
51316 
51317 else
51318   supports=no
51319 fi
51320 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51321   ac_ext=cpp
51322 ac_cpp='$CXXCPP $CPPFLAGS'
51323 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51324 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51325 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51326 
51327   CXXFLAGS="$saved_cxxflags"
51328 
51329   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51330 $as_echo "$supports" >&6; }
51331   if test "x$supports" = "xyes" ; then
51332     :
51333 
51334   else
51335     :
51336     OPENJDK_BUILD_CXXSTD_CXXFLAG=""
51337   fi
51338 
51339 
51340 
51341 
51342 
51343 
51344 
51345 
51346 
51347 
51348 
51349 
51350     OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
51351     OPENJDK_BUILD_JVM_CFLAGS="${OPENJDK_BUILD_JVM_CFLAGS} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
51352 
51353   fi
51354   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51355     OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
51356     OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
51357   fi
51358 
51359   OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
51360   OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
51361   OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
51362 
51363   ###############################################################################
51364   #
51365   # Now setup the CFLAGS and LDFLAGS for the JDK build.
51366   # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
51367   #
51368 
51369   # Setup compiler/platform specific flags into
51370   #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
51371   #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
51372   #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
51373   if test "x$TOOLCHAIN_TYPE" = xgcc; then
51374     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
51375     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
51376     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
51377     if test "x$OPENJDK_BUILD_CPU" = xx86; then
51378       # Force compatibility with i586 on 32 bit intel platforms.
51379       OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
51380       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
51381     fi
51382     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51383         -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51384     case $OPENJDK_BUILD_CPU_ARCH in
51385       arm )
51386         # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51387         OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51388         OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="${OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK} -fsigned-char"
51389         ;;
51390       ppc )
51391         # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51392         OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51393         ;;
51394       s390 )
51395         OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
51396         OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51397         ;;
51398       * )
51399         OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51400         OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51401         ;;
51402     esac
51403 
51404 
51405 
51406 
51407 
51408 
51409 
51410 
51411 
51412 
51413 
51414 
51415 
51416 
51417 
51418 
51419 
51420 
51421 
51422 
51423 
51424 
51425 
51426 
51427 
51428 
51429 
51430 
51431 
51432 
51433 
51434 
51435 
51436 
51437 
51438 
51439 
51440 
51441 
51442 
51443 
51444 
51445 
51446 
51447 
51448 
51449 
51450 
51451 
51452 
51453 
51454 
51455 
51456 
51457     # Execute function body
51458 
51459   # Need to assign to a variable since m4 is blocked from modifying parts in [].
51460   REFERENCE_VERSION=6
51461 
51462   if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51463     as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51464   fi
51465 
51466   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51467     as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
51468   fi
51469 
51470   # Version comparison method inspired by http://stackoverflow.com/a/24067243
51471   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51472 
51473   if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51474     :
51475 
51476   # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
51477   # runs afoul of the more aggressive versions of these optimisations.
51478   # Notably, value range propagation now assumes that the this pointer of C++
51479   # member functions is non-null.
51480   NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
51481         NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
51482         { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
51483 $as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
51484   OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
51485   OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
51486 
51487   else
51488     :
51489 
51490   fi
51491 
51492 
51493 
51494 
51495 
51496 
51497 
51498 
51499 
51500 
51501 
51502 
51503 
51504 
51505   elif test "x$TOOLCHAIN_TYPE" = xclang; then
51506     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
51507 
51508     # Restrict the debug information created by Clang to avoid
51509     # too big object files and speed the build up a little bit
51510     # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
51511     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
51512     if test "x$OPENJDK_BUILD_OS" = xlinux; then
51513       if test "x$OPENJDK_BUILD_CPU" = xx86; then
51514         # Force compatibility with i586 on 32 bit intel platforms.
51515         OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
51516         OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
51517       fi
51518       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
51519       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51520           -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51521       case $OPENJDK_BUILD_CPU_ARCH in
51522         ppc )
51523           # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51524           OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51525           ;;
51526         * )
51527           OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51528           OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51529           ;;
51530       esac
51531     fi
51532   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51533     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
51534     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
51535     if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
51536       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
51537     fi
51538 
51539     OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
51540     OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
51541   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51542     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
51543     OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51544     OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51545   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51546     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51547         -MD -Zc:wchar_t- -W3 -wd4800 \
51548         -DWIN32_LEAN_AND_MEAN \
51549         -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
51550         -D_WINSOCK_DEPRECATED_NO_WARNINGS \
51551         -DWIN32 -DIAL"
51552     if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51553       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
51554     else
51555       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
51556     fi
51557     # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
51558     # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
51559     # studio.
51560     if test "x$TOOLCHAIN_VERSION" = "x2010"; then
51561       STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
51562       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
51563       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
51564     fi
51565   fi
51566 
51567   ###############################################################################
51568 
51569   # Adjust flags according to debug level.
51570   case $DEBUG_LEVEL in
51571     fastdebug | slowdebug )
51572       OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
51573       OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
51574       ;;
51575     release )
51576       ;;
51577     * )
51578       as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51579       ;;
51580   esac
51581 
51582   # Set some common defines. These works for all compilers, but assume
51583   # -D is universally accepted.
51584 
51585   # Setup endianness
51586   if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
51587     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
51588     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
51589     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
51590     #   Note: -Dmacro         is the same as    #define macro 1
51591     #         -Dmacro=        is the same as    #define macro
51592     if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51593       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
51594     else
51595       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
51596     fi
51597   else
51598     # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
51599     # are defined in the system?
51600     if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51601       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
51602     else
51603       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
51604     fi
51605   fi
51606 
51607   # Setup target OS define. Use OS target name but in upper case.
51608   OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
51609   OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
51610 
51611   # Setup target CPU
51612   OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51613       $OPENJDK_BUILD_ADD_LP64 \
51614       -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
51615 
51616   # Setup debug/release defines
51617   if test "x$DEBUG_LEVEL" = xrelease; then
51618     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
51619     if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51620       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
51621     fi
51622   else
51623     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
51624   fi
51625 
51626   # Set some additional per-OS defines.
51627   if test "x$OPENJDK_BUILD_OS" = xlinux; then
51628     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
51629     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
51630         -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
51631   elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51632     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
51633     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
51634         -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
51635   elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51636     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
51637     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
51638     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
51639     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
51640         -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
51641         -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
51642         -fno-omit-frame-pointer"
51643   elif test "x$OPENJDK_BUILD_OS" = xaix; then
51644     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
51645     # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
51646     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
51647         -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
51648         -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
51649   elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51650     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
51651   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51652     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
51653     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
51654   fi
51655 
51656   # Set some additional per-CPU defines.
51657   if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
51658     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
51659   elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51660     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
51661   elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
51662     if test "x$OPENJDK_BUILD_OS" = xlinux; then
51663       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51664       # fixes `relocation truncated to fit' error for gcc 4.1.
51665       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
51666       # Use ppc64 instructions, but schedule for power5
51667       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
51668     elif test "x$OPENJDK_BUILD_OS" = xaix; then
51669       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
51670     fi
51671   elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
51672     if test "x$OPENJDK_BUILD_OS" = xlinux; then
51673       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51674       # Little endian machine uses ELFv2 ABI.
51675       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
51676       # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
51677       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power8 -mtune=power8"
51678     fi
51679   elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
51680     if test "x$OPENJDK_BUILD_OS" = xlinux; then
51681       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mbackchain -march=z10"
51682     fi
51683   fi
51684 
51685   if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
51686     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
51687   fi
51688 
51689   if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
51690     if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
51691       # Solaris does not have _LP64=1 in the old build.
51692       # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
51693       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
51694     fi
51695   fi
51696 
51697   # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
51698   if test "x$OPENJDK_BUILD_OS" = xlinux; then
51699     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
51700         -Wunused-value -Woverloaded-virtual"
51701 
51702     if test "x$TOOLCHAIN_TYPE" = xgcc; then
51703 
51704 
51705 
51706 
51707 
51708 
51709 
51710 
51711 
51712 
51713 
51714 
51715 
51716 
51717 
51718 
51719 
51720 
51721 
51722 
51723 
51724 
51725 
51726 
51727 
51728 
51729 
51730 
51731 
51732 
51733 
51734 
51735 
51736 
51737 
51738 
51739 
51740 
51741 
51742 
51743 
51744 
51745 
51746 
51747 
51748 
51749 
51750 
51751 
51752 
51753 
51754 
51755 
51756 
51757     # Execute function body
51758 
51759   # Need to assign to a variable since m4 is blocked from modifying parts in [].
51760   REFERENCE_VERSION=4.8
51761 
51762   if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51763     as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51764   fi
51765 
51766   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51767     as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51768   fi
51769 
51770   # Version comparison method inspired by http://stackoverflow.com/a/24067243
51771   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51772 
51773   if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51774     :
51775 
51776             # These flags either do not work or give spurious warnings prior to gcc 4.8.
51777             OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51778 
51779 
51780   else
51781     :
51782 
51783   fi
51784 
51785 
51786 
51787 
51788 
51789 
51790 
51791 
51792 
51793 
51794 
51795 
51796 
51797 
51798     fi
51799     if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51800       # Non-zero builds have stricter warnings
51801       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51802     else
51803       if test "x$TOOLCHAIN_TYPE" = xclang; then
51804         # Some versions of llvm do not like -Wundef
51805         OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
51806       fi
51807     fi
51808   elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51809     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51810         -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51811   fi
51812 
51813   # Additional macosx handling
51814   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51815     # Setting these parameters makes it an error to link to macosx APIs that are
51816     # newer than the given OS version and makes the linked binaries compatible
51817     # even if built on a newer version of the OS.
51818     # The expected format is X.Y.Z
51819     MACOSX_VERSION_MIN=10.7.0
51820 
51821 
51822     # The macro takes the version with no dots, ex: 1070
51823     # Let the flags variables get resolved in make for easier override on make
51824     # command line.
51825     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)"
51826     OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51827   fi
51828 
51829   # Setup some hard coded includes
51830   OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51831       -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
51832       -I${JDK_TOPDIR}/src/java.base/share/native/include \
51833       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
51834       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
51835       -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51836       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
51837 
51838   # The shared libraries are compiled using the picflag.
51839   OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51840       $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
51841   OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51842       $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
51843 
51844   # Executable flags
51845   OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
51846   OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
51847 
51848 
51849 
51850 
51851 
51852 
51853   # Setup LDFLAGS et al.
51854   #
51855 
51856   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51857     LDFLAGS_MICROSOFT="-nologo -opt:ref"
51858     OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51859     OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51860     if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
51861       LDFLAGS_SAFESH="-safeseh"
51862       OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
51863       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
51864       # NOTE: Old build added -machine. Probably not needed.
51865       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
51866     else
51867       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
51868     fi
51869   elif test "x$TOOLCHAIN_TYPE" = xclang; then
51870       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51871       if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51872         # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51873         OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51874     fi
51875   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51876     # If this is a --hash-style=gnu system, use --hash-style=both, why?
51877     # We have previously set HAS_GNU_HASH if this is the case
51878     if test -n "$HAS_GNU_HASH"; then
51879       OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51880       OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51881       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51882     fi
51883       if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51884         OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51885     fi
51886     if test "x$OPENJDK_BUILD_OS" = xlinux; then
51887       # And since we now know that the linker is gnu, then add -z defs, to forbid
51888       # undefined symbols in object files.
51889       LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51890       OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51891       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51892       LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51893       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51894       if test "x$OPENJDK_BUILD_CPU" = xx86; then
51895         OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
51896       fi
51897       case $DEBUG_LEVEL in
51898         release )
51899           # tell linker to optimize libraries.
51900           # Should this be supplied to the OSS linker as well?
51901           LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51902           OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51903           OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51904           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51905             OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51906           fi
51907           ;;
51908         slowdebug )
51909           # Hotspot always let the linker optimize
51910           OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51911           if test "x$HAS_LINKER_NOW" = "xtrue"; then
51912             # do relocations at load
51913             OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
51914             OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51915             OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
51916           fi
51917           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51918             # mark relocations read only
51919             OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51920             OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51921             OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51922           fi
51923           ;;
51924         fastdebug )
51925           # Hotspot always let the linker optimize
51926           OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51927           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51928             # mark relocations read only
51929             OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51930             OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51931             OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51932           fi
51933           ;;
51934         * )
51935           as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51936           ;;
51937         esac
51938     fi
51939   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51940     LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51941     OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
51942     LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51943     OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51944     OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51945     if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51946       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
51947     fi
51948   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51949     LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51950     OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
51951     OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
51952   fi
51953 
51954   # Customize LDFLAGS for executables
51955 
51956   OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
51957 
51958   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51959     if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
51960       LDFLAGS_STACK_SIZE=1048576
51961     else
51962       LDFLAGS_STACK_SIZE=327680
51963     fi
51964     OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51965   elif test "x$OPENJDK_BUILD_OS" = xlinux; then
51966     OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51967   fi
51968 
51969   OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51970 
51971   # Customize LDFLAGS for libs
51972   OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
51973 
51974   OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51975   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51976     OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51977         -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51978     OPENJDK_BUILD_JDKLIB_LIBS=""
51979   else
51980     OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51981         -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
51982 
51983     if test "xBUILD" = "xTARGET"; then
51984       # On some platforms (mac) the linker warns about non existing -L dirs.
51985       # For any of the variants server, client or minimal, the dir matches the
51986       # variant name. The "main" variant should be used for linking. For the
51987       # rest, the dir is just server.
51988       if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
51989           ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51990         OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51991             -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
51992       else
51993         OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51994             -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51995       fi
51996     elif test "xBUILD" = "xBUILD"; then
51997       # When building a buildjdk, it's always only the server variant
51998       OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51999           -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
52000     fi
52001 
52002     OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
52003     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52004       OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
52005     fi
52006 
52007   fi
52008 
52009 OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_JAVA_BASE_LDFLAGS}"
52010 
52011   # Set OPENJDK_BUILD_JVM_LIBS (per os)
52012   if test "x$OPENJDK_BUILD_OS" = xlinux; then
52013     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
52014   elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
52015     # FIXME: This hard-coded path is not really proper.
52016     if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
52017       OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
52018     elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
52019       OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
52020     fi
52021     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
52022         -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
52023   elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52024     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
52025   elif test "x$OPENJDK_BUILD_OS" = xaix; then
52026     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
52027   elif test "x$OPENJDK_BUILD_OS" = xbsd; then
52028     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
52029   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
52030     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
52031         comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
52032         wsock32.lib winmm.lib version.lib psapi.lib"
52033     fi
52034 
52035   # Set OPENJDK_BUILD_JVM_ASFLAGS
52036   if test "x$OPENJDK_BUILD_OS" = xlinux; then
52037     if test "x$OPENJDK_BUILD_CPU" = xx86; then
52038       OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
52039     fi
52040   elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52041     OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
52042   fi
52043 
52044   OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
52045 
52046 
52047 
52048 
52049 
52050 
52051 
52052 
52053 
52054 
52055 
52056 
52057 
52058 
52059 
52060   # Tests are only ever compiled for TARGET
52061   # Flags for compiling test libraries
52062   CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
52063   CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
52064 
52065   # Flags for compiling test executables
52066   CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
52067   CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
52068 
52069 
52070 
52071 
52072 
52073 
52074   LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
52075   LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
52076 
52077 
52078 
52079 
52080 
52081 
52082   # Check that the compiler supports -mX (or -qX on AIX) flags
52083   # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
52084 
52085 
52086 
52087 
52088 
52089 
52090 
52091 
52092 
52093 
52094 
52095 
52096 
52097 
52098 
52099 
52100 
52101 
52102 
52103 
52104 
52105 
52106 
52107 
52108 
52109 
52110 
52111 
52112 
52113 
52114 
52115 
52116 
52117 
52118 
52119 
52120 
52121 
52122 
52123 
52124 
52125 
52126 
52127 
52128 
52129 
52130 
52131     # Execute function body
52132 
52133 
52134 
52135 
52136 
52137 
52138 
52139 
52140 
52141 
52142 
52143 
52144 
52145 
52146 
52147 
52148 
52149 
52150 
52151 
52152 
52153 
52154 
52155 
52156 
52157 
52158 
52159 
52160 
52161 
52162 
52163 
52164 
52165 
52166 
52167 
52168 
52169 
52170 
52171 
52172 
52173 
52174 
52175 
52176 
52177 
52178 
52179 
52180     # Execute function body
52181 
52182   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52183 $as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52184   supports=yes
52185 
52186   saved_cflags="$CFLAGS"
52187   CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
52188   ac_ext=c
52189 ac_cpp='$CPP $CPPFLAGS'
52190 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52191 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52192 ac_compiler_gnu=$ac_cv_c_compiler_gnu
52193 
52194   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52195 /* end confdefs.h.  */
52196 int i;
52197 _ACEOF
52198 if ac_fn_c_try_compile "$LINENO"; then :
52199 
52200 else
52201   supports=no
52202 fi
52203 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52204   ac_ext=cpp
52205 ac_cpp='$CXXCPP $CPPFLAGS'
52206 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52207 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52208 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52209 
52210   CFLAGS="$saved_cflags"
52211 
52212   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52213 $as_echo "$supports" >&6; }
52214   if test "x$supports" = "xyes" ; then
52215     :
52216     C_COMP_SUPPORTS="yes"
52217   else
52218     :
52219     C_COMP_SUPPORTS="no"
52220   fi
52221 
52222 
52223 
52224 
52225 
52226 
52227 
52228 
52229 
52230 
52231 
52232 
52233 
52234 
52235 
52236 
52237 
52238 
52239 
52240 
52241 
52242 
52243 
52244 
52245 
52246 
52247 
52248 
52249 
52250 
52251 
52252 
52253 
52254 
52255 
52256 
52257 
52258 
52259 
52260 
52261 
52262 
52263 
52264 
52265 
52266 
52267 
52268 
52269 
52270 
52271 
52272 
52273 
52274 
52275 
52276 
52277 
52278 
52279 
52280     # Execute function body
52281 
52282   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52283 $as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52284   supports=yes
52285 
52286   saved_cxxflags="$CXXFLAGS"
52287   CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
52288   ac_ext=cpp
52289 ac_cpp='$CXXCPP $CPPFLAGS'
52290 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52291 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52292 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52293 
52294   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52295 /* end confdefs.h.  */
52296 int i;
52297 _ACEOF
52298 if ac_fn_cxx_try_compile "$LINENO"; then :
52299 
52300 else
52301   supports=no
52302 fi
52303 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52304   ac_ext=cpp
52305 ac_cpp='$CXXCPP $CPPFLAGS'
52306 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52307 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52308 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52309 
52310   CXXFLAGS="$saved_cxxflags"
52311 
52312   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52313 $as_echo "$supports" >&6; }
52314   if test "x$supports" = "xyes" ; then
52315     :
52316     CXX_COMP_SUPPORTS="yes"
52317   else
52318     :
52319     CXX_COMP_SUPPORTS="no"
52320   fi
52321 
52322 
52323 
52324 
52325 
52326 
52327 
52328 
52329 
52330 
52331 
52332 
52333 
52334   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52335 $as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52336   supports=no
52337   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52338 
52339   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52340 $as_echo "$supports" >&6; }
52341   if test "x$supports" = "xyes" ; then
52342     :
52343     COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
52344   else
52345     :
52346     COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
52347   fi
52348 
52349 
52350 
52351 
52352 
52353 
52354 
52355 
52356   # Check whether --enable-warnings-as-errors was given.
52357 if test "${enable_warnings_as_errors+set}" = set; then :
52358   enableval=$enable_warnings_as_errors;
52359 fi
52360 
52361 
52362   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
52363 $as_echo_n "checking if native warnings are errors... " >&6; }
52364   if test "x$enable_warnings_as_errors" = "xyes"; then
52365     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitly set)" >&5
52366 $as_echo "yes (explicitly set)" >&6; }
52367     WARNINGS_AS_ERRORS=true
52368   elif test "x$enable_warnings_as_errors" = "xno"; then
52369     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52370 $as_echo "no" >&6; }
52371     WARNINGS_AS_ERRORS=false
52372   elif test "x$enable_warnings_as_errors" = "x"; then
52373     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
52374 $as_echo "yes (default)" >&6; }
52375     WARNINGS_AS_ERRORS=true
52376   else
52377     as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
52378   fi
52379 
52380 
52381 
52382   case "${TOOLCHAIN_TYPE}" in
52383     microsoft)
52384       DISABLE_WARNING_PREFIX="-wd"
52385       CFLAGS_WARNINGS_ARE_ERRORS="-WX"
52386       ;;
52387     solstudio)
52388       DISABLE_WARNING_PREFIX="-erroff="
52389       CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
52390       ;;
52391     gcc)
52392       # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
52393 
52394 
52395 
52396 
52397 
52398 
52399 
52400 
52401 
52402 
52403 
52404 
52405 
52406 
52407 
52408 
52409 
52410 
52411 
52412 
52413 
52414 
52415 
52416 
52417 
52418 
52419 
52420 
52421 
52422 
52423 
52424 
52425 
52426 
52427 
52428 
52429 
52430 
52431 
52432 
52433 
52434 
52435 
52436 
52437 
52438 
52439 
52440     # Execute function body
52441 
52442 
52443 
52444 
52445 
52446 
52447 
52448 
52449 
52450 
52451 
52452 
52453 
52454 
52455 
52456 
52457 
52458 
52459 
52460 
52461 
52462 
52463 
52464 
52465 
52466 
52467 
52468 
52469 
52470 
52471 
52472 
52473 
52474 
52475 
52476 
52477 
52478 
52479 
52480 
52481 
52482 
52483 
52484 
52485 
52486 
52487 
52488 
52489     # Execute function body
52490 
52491   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52492 $as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52493   supports=yes
52494 
52495   saved_cflags="$CFLAGS"
52496   CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52497   ac_ext=c
52498 ac_cpp='$CPP $CPPFLAGS'
52499 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52500 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52501 ac_compiler_gnu=$ac_cv_c_compiler_gnu
52502 
52503   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52504 /* end confdefs.h.  */
52505 int i;
52506 _ACEOF
52507 if ac_fn_c_try_compile "$LINENO"; then :
52508 
52509 else
52510   supports=no
52511 fi
52512 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52513   ac_ext=cpp
52514 ac_cpp='$CXXCPP $CPPFLAGS'
52515 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52516 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52517 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52518 
52519   CFLAGS="$saved_cflags"
52520 
52521   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52522 $as_echo "$supports" >&6; }
52523   if test "x$supports" = "xyes" ; then
52524     :
52525     C_COMP_SUPPORTS="yes"
52526   else
52527     :
52528     C_COMP_SUPPORTS="no"
52529   fi
52530 
52531 
52532 
52533 
52534 
52535 
52536 
52537 
52538 
52539 
52540 
52541 
52542 
52543 
52544 
52545 
52546 
52547 
52548 
52549 
52550 
52551 
52552 
52553 
52554 
52555 
52556 
52557 
52558 
52559 
52560 
52561 
52562 
52563 
52564 
52565 
52566 
52567 
52568 
52569 
52570 
52571 
52572 
52573 
52574 
52575 
52576 
52577 
52578 
52579 
52580 
52581 
52582 
52583 
52584 
52585 
52586 
52587 
52588 
52589     # Execute function body
52590 
52591   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52592 $as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52593   supports=yes
52594 
52595   saved_cxxflags="$CXXFLAGS"
52596   CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52597   ac_ext=cpp
52598 ac_cpp='$CXXCPP $CPPFLAGS'
52599 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52600 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52601 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52602 
52603   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52604 /* end confdefs.h.  */
52605 int i;
52606 _ACEOF
52607 if ac_fn_cxx_try_compile "$LINENO"; then :
52608 
52609 else
52610   supports=no
52611 fi
52612 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52613   ac_ext=cpp
52614 ac_cpp='$CXXCPP $CPPFLAGS'
52615 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52616 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52617 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52618 
52619   CXXFLAGS="$saved_cxxflags"
52620 
52621   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52622 $as_echo "$supports" >&6; }
52623   if test "x$supports" = "xyes" ; then
52624     :
52625     CXX_COMP_SUPPORTS="yes"
52626   else
52627     :
52628     CXX_COMP_SUPPORTS="no"
52629   fi
52630 
52631 
52632 
52633 
52634 
52635 
52636 
52637 
52638 
52639 
52640 
52641 
52642 
52643   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52644 $as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52645   supports=no
52646   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52647 
52648   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52649 $as_echo "$supports" >&6; }
52650   if test "x$supports" = "xyes" ; then
52651     :
52652     GCC_CAN_DISABLE_WARNINGS=true
52653   else
52654     :
52655     GCC_CAN_DISABLE_WARNINGS=false
52656 
52657   fi
52658 
52659 
52660 
52661 
52662 
52663 
52664       if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52665         DISABLE_WARNING_PREFIX="-Wno-"
52666       else
52667         DISABLE_WARNING_PREFIX=
52668       fi
52669       CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52670       # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
52671       # CFLAGS since any target specific flags will likely not work with the
52672       # build compiler
52673       CC_OLD="$CC"
52674       CXX_OLD="$CXX"
52675       CC="$BUILD_CC"
52676       CXX="$BUILD_CXX"
52677       CFLAGS_OLD="$CFLAGS"
52678       CFLAGS=""
52679 
52680 
52681 
52682 
52683 
52684 
52685 
52686 
52687 
52688 
52689 
52690 
52691 
52692 
52693 
52694 
52695 
52696 
52697 
52698 
52699 
52700 
52701 
52702 
52703 
52704 
52705 
52706 
52707 
52708 
52709 
52710 
52711 
52712 
52713 
52714 
52715 
52716 
52717 
52718 
52719 
52720 
52721 
52722 
52723 
52724 
52725 
52726     # Execute function body
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 
52773 
52774 
52775     # Execute function body
52776 
52777   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52778 $as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52779   supports=yes
52780 
52781   saved_cflags="$CFLAGS"
52782   CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52783   ac_ext=c
52784 ac_cpp='$CPP $CPPFLAGS'
52785 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52786 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52787 ac_compiler_gnu=$ac_cv_c_compiler_gnu
52788 
52789   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52790 /* end confdefs.h.  */
52791 int i;
52792 _ACEOF
52793 if ac_fn_c_try_compile "$LINENO"; then :
52794 
52795 else
52796   supports=no
52797 fi
52798 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52799   ac_ext=cpp
52800 ac_cpp='$CXXCPP $CPPFLAGS'
52801 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52802 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52803 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52804 
52805   CFLAGS="$saved_cflags"
52806 
52807   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52808 $as_echo "$supports" >&6; }
52809   if test "x$supports" = "xyes" ; then
52810     :
52811     C_COMP_SUPPORTS="yes"
52812   else
52813     :
52814     C_COMP_SUPPORTS="no"
52815   fi
52816 
52817 
52818 
52819 
52820 
52821 
52822 
52823 
52824 
52825 
52826 
52827 
52828 
52829 
52830 
52831 
52832 
52833 
52834 
52835 
52836 
52837 
52838 
52839 
52840 
52841 
52842 
52843 
52844 
52845 
52846 
52847 
52848 
52849 
52850 
52851 
52852 
52853 
52854 
52855 
52856 
52857 
52858 
52859 
52860 
52861 
52862 
52863 
52864 
52865 
52866 
52867 
52868 
52869 
52870 
52871 
52872 
52873 
52874 
52875     # Execute function body
52876 
52877   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52878 $as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52879   supports=yes
52880 
52881   saved_cxxflags="$CXXFLAGS"
52882   CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52883   ac_ext=cpp
52884 ac_cpp='$CXXCPP $CPPFLAGS'
52885 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52886 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52887 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52888 
52889   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52890 /* end confdefs.h.  */
52891 int i;
52892 _ACEOF
52893 if ac_fn_cxx_try_compile "$LINENO"; then :
52894 
52895 else
52896   supports=no
52897 fi
52898 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52899   ac_ext=cpp
52900 ac_cpp='$CXXCPP $CPPFLAGS'
52901 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52902 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52903 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52904 
52905   CXXFLAGS="$saved_cxxflags"
52906 
52907   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52908 $as_echo "$supports" >&6; }
52909   if test "x$supports" = "xyes" ; then
52910     :
52911     CXX_COMP_SUPPORTS="yes"
52912   else
52913     :
52914     CXX_COMP_SUPPORTS="no"
52915   fi
52916 
52917 
52918 
52919 
52920 
52921 
52922 
52923 
52924 
52925 
52926 
52927 
52928 
52929   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52930 $as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52931   supports=no
52932   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52933 
52934   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52935 $as_echo "$supports" >&6; }
52936   if test "x$supports" = "xyes" ; then
52937     :
52938     BUILD_CC_CAN_DISABLE_WARNINGS=true
52939   else
52940     :
52941     BUILD_CC_CAN_DISABLE_WARNINGS=false
52942 
52943   fi
52944 
52945 
52946 
52947 
52948 
52949 
52950       if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52951         BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
52952       else
52953         BUILD_CC_DISABLE_WARNING_PREFIX=
52954       fi
52955       CC="$CC_OLD"
52956       CXX="$CXX_OLD"
52957       CFLAGS="$CFLAGS_OLD"
52958       ;;
52959     clang)
52960       DISABLE_WARNING_PREFIX="-Wno-"
52961       CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52962       ;;
52963     xlc)
52964       DISABLE_WARNING_PREFIX="-qsuppress="
52965       CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
52966       ;;
52967   esac
52968 
52969 
52970 
52971 
52972 
52973 # Setup debug symbols (need objcopy from the toolchain for that)
52974 
52975   #
52976   # NATIVE_DEBUG_SYMBOLS
52977   # This must be done after the toolchain is setup, since we're looking at objcopy.
52978   #
52979   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
52980 $as_echo_n "checking what type of native debug symbols to use... " >&6; }
52981 
52982 # Check whether --with-native-debug-symbols was given.
52983 if test "${with_native_debug_symbols+set}" = set; then :
52984   withval=$with_native_debug_symbols;
52985         if test "x$OPENJDK_TARGET_OS" = xaix; then
52986           if test "x$withval" = xexternal || test "x$withval" = xzipped; then
52987             as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
52988           fi
52989         fi
52990 
52991 else
52992 
52993         if test "x$OPENJDK_TARGET_OS" = xaix; then
52994           # AIX doesn't support 'zipped' so use 'internal' as default
52995           with_native_debug_symbols="internal"
52996         else
52997           if test "x$STATIC_BUILD" = xtrue; then
52998             with_native_debug_symbols="none"
52999           else
53000             with_native_debug_symbols="zipped"
53001           fi
53002         fi
53003 
53004 fi
53005 
53006   NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
53007   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
53008 $as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
53009 
53010   if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
53011 
53012     if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
53013       if test "x$OBJCOPY" = x; then
53014         # enabling of enable-debug-symbols and can't find objcopy
53015         # this is an error
53016         as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
53017       fi
53018     fi
53019 
53020     COMPILE_WITH_DEBUG_SYMBOLS=true
53021     COPY_DEBUG_SYMBOLS=true
53022     ZIP_EXTERNAL_DEBUG_SYMBOLS=true
53023   elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
53024     COMPILE_WITH_DEBUG_SYMBOLS=false
53025     COPY_DEBUG_SYMBOLS=false
53026     ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53027   elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
53028     COMPILE_WITH_DEBUG_SYMBOLS=true
53029     COPY_DEBUG_SYMBOLS=false
53030     ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53031   elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
53032 
53033     if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
53034       if test "x$OBJCOPY" = x; then
53035         # enabling of enable-debug-symbols and can't find objcopy
53036         # this is an error
53037         as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
53038       fi
53039     fi
53040 
53041     COMPILE_WITH_DEBUG_SYMBOLS=true
53042     COPY_DEBUG_SYMBOLS=true
53043     ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53044   else
53045     as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
53046   fi
53047 
53048   # --enable-debug-symbols is deprecated.
53049   # Please use --with-native-debug-symbols=[internal,external,zipped] .
53050 
53051   # Check whether --enable-debug-symbols was given.
53052 if test "${enable_debug_symbols+set}" = set; then :
53053   enableval=$enable_debug_symbols;
53054 fi
53055 
53056   if test "x$enable_debug_symbols" != x; then
53057     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
53058 $as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
53059 
53060     if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
53061       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
53062 $as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
53063     fi
53064 
53065   fi
53066 
53067 
53068   # --enable-zip-debug-info is deprecated.
53069   # Please use --with-native-debug-symbols=zipped .
53070 
53071   # Check whether --enable-zip-debug-info was given.
53072 if test "${enable_zip_debug_info+set}" = set; then :
53073   enableval=$enable_zip_debug_info;
53074 fi
53075 
53076   if test "x$enable_zip_debug_info" != x; then
53077     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
53078 $as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
53079 
53080     if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
53081       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
53082 $as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
53083     fi
53084 
53085   fi
53086 
53087 
53088 
53089 
53090 
53091 
53092 
53093   # Check whether --enable-native-coverage was given.
53094 if test "${enable_native_coverage+set}" = set; then :
53095   enableval=$enable_native_coverage;
53096 fi
53097 
53098   GCOV_ENABLED="false"
53099   if test "x$enable_native_coverage" = "xyes"; then
53100     if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
53101       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
53102 $as_echo_n "checking if native coverage is enabled... " >&6; }
53103       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53104 $as_echo "yes" >&6; }
53105       GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
53106       GCOV_LDFLAGS="-fprofile-arcs"
53107       JVM_CFLAGS="$JVM_CFLAGS $GCOV_CFLAGS"
53108       JVM_LDFLAGS="$JVM_LDFLAGS $GCOV_LDFLAGS"
53109       CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
53110       CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
53111       CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
53112       CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
53113       LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
53114       LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
53115       GCOV_ENABLED="true"
53116     else
53117       as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
53118     fi
53119   elif test "x$enable_native_coverage" = "xno"; then
53120     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
53121 $as_echo_n "checking if native coverage is enabled... " >&6; }
53122     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53123 $as_echo "no" >&6; }
53124   elif test "x$enable_native_coverage" != "x"; then
53125     as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
53126   fi
53127 
53128 
53129 
53130 
53131 # Need toolchain to setup dtrace
53132 
53133   # Test for dtrace dependencies
53134   # Check whether --enable-dtrace was given.
53135 if test "${enable_dtrace+set}" = set; then :
53136   enableval=$enable_dtrace;
53137 fi
53138 
53139 
53140   DTRACE_DEP_MISSING=false
53141 
53142   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
53143 $as_echo_n "checking for dtrace tool... " >&6; }
53144   if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
53145     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
53146 $as_echo "$DTRACE" >&6; }
53147   else
53148     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
53149 $as_echo "not found, cannot build dtrace" >&6; }
53150     DTRACE_DEP_MISSING=true
53151   fi
53152 
53153   for ac_header in sys/sdt.h
53154 do :
53155   ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
53156 if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
53157   cat >>confdefs.h <<_ACEOF
53158 #define HAVE_SYS_SDT_H 1
53159 _ACEOF
53160  DTRACE_HEADERS_OK=yes
53161 else
53162   DTRACE_HEADERS_OK=no
53163 fi
53164 
53165 done
53166 
53167   if test "x$DTRACE_HEADERS_OK" != "xyes"; then
53168     DTRACE_DEP_MISSING=true
53169   fi
53170 
53171   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
53172 $as_echo_n "checking if dtrace should be built... " >&6; }
53173   if test "x$enable_dtrace" = "xyes"; then
53174     if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
53175       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
53176 $as_echo "no, missing dependencies" >&6; }
53177 
53178   # Print a helpful message on how to acquire the necessary build dependency.
53179   # dtrace is the help tag: freetype, cups, alsa etc
53180   MISSING_DEPENDENCY=dtrace
53181 
53182   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53183     cygwin_help $MISSING_DEPENDENCY
53184   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53185     msys_help $MISSING_DEPENDENCY
53186   else
53187     PKGHANDLER_COMMAND=
53188 
53189     case $PKGHANDLER in
53190       apt-get)
53191         apt_help     $MISSING_DEPENDENCY ;;
53192       yum)
53193         yum_help     $MISSING_DEPENDENCY ;;
53194       brew)
53195         brew_help    $MISSING_DEPENDENCY ;;
53196       port)
53197         port_help    $MISSING_DEPENDENCY ;;
53198       pkgutil)
53199         pkgutil_help $MISSING_DEPENDENCY ;;
53200       pkgadd)
53201         pkgadd_help  $MISSING_DEPENDENCY ;;
53202     esac
53203 
53204     if test "x$PKGHANDLER_COMMAND" != x; then
53205       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
53206     fi
53207   fi
53208 
53209       as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
53210     else
53211       INCLUDE_DTRACE=true
53212       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
53213 $as_echo "yes, forced" >&6; }
53214     fi
53215   elif test "x$enable_dtrace" = "xno"; then
53216     INCLUDE_DTRACE=false
53217     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
53218 $as_echo "no, forced" >&6; }
53219   elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
53220     if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
53221       INCLUDE_DTRACE=false
53222       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
53223 $as_echo "no, missing dependencies" >&6; }
53224     else
53225       INCLUDE_DTRACE=true
53226       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
53227 $as_echo "yes, dependencies present" >&6; }
53228     fi
53229   else
53230     as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
53231   fi
53232 
53233 
53234   # Check whether --enable-aot was given.
53235 if test "${enable_aot+set}" = set; then :
53236   enableval=$enable_aot;
53237 fi
53238 
53239 
53240   if test "x$enable_aot" = "x" || test "x$enable_aot" = "xauto"; then
53241     ENABLE_AOT="true"
53242   elif test "x$enable_aot" = "xyes"; then
53243     ENABLE_AOT="true"
53244   elif test "x$enable_aot" = "xno"; then
53245     ENABLE_AOT="false"
53246     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
53247 $as_echo_n "checking if aot should be enabled... " >&6; }
53248     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
53249 $as_echo "no, forced" >&6; }
53250   else
53251     as_fn_error $? "Invalid value for --enable-aot: $enable_aot" "$LINENO" 5
53252   fi
53253 
53254   if test "x$ENABLE_AOT" = "xtrue"; then
53255     # Only enable AOT on linux-X64.
53256     if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = "xlinux-x86_64"; then
53257       if test -e "$HOTSPOT_TOPDIR/src/jdk.aot"; then
53258         if test -e "$HOTSPOT_TOPDIR/src/jdk.internal.vm.compiler"; then
53259           ENABLE_AOT="true"
53260         else
53261           ENABLE_AOT="false"
53262           if test "x$enable_aot" = "xyes"; then
53263             as_fn_error $? "Cannot build AOT without hotspot/src/jdk.internal.vm.compiler sources. Remove --enable-aot." "$LINENO" 5
53264           fi
53265         fi
53266       else
53267         ENABLE_AOT="false"
53268         if test "x$enable_aot" = "xyes"; then
53269           as_fn_error $? "Cannot build AOT without hotspot/src/jdk.aot sources. Remove --enable-aot." "$LINENO" 5
53270         fi
53271       fi
53272     else
53273       ENABLE_AOT="false"
53274       if test "x$enable_aot" = "xyes"; then
53275         as_fn_error $? "AOT is currently only supported on Linux-x86_64. Remove --enable-aot." "$LINENO" 5
53276       fi
53277     fi
53278   fi
53279 
53280 
53281 
53282 
53283   # Check whether --enable-hotspot-gtest was given.
53284 if test "${enable_hotspot_gtest+set}" = set; then :
53285   enableval=$enable_hotspot_gtest;
53286 fi
53287 
53288 
53289   if test -e "$HOTSPOT_TOPDIR/test/native"; then
53290     GTEST_DIR_EXISTS="true"
53291   else
53292     GTEST_DIR_EXISTS="false"
53293   fi
53294 
53295   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
53296 $as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
53297   if test "x$enable_hotspot_gtest" = "xyes"; then
53298     if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
53299       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
53300 $as_echo "yes, forced" >&6; }
53301       BUILD_GTEST="true"
53302     else
53303       as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
53304     fi
53305   elif test "x$enable_hotspot_gtest" = "xno"; then
53306     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
53307 $as_echo "no, forced" >&6; }
53308     BUILD_GTEST="false"
53309   elif test "x$enable_hotspot_gtest" = "x"; then
53310     if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
53311       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53312 $as_echo "yes" >&6; }
53313       BUILD_GTEST="true"
53314     else
53315       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53316 $as_echo "no" >&6; }
53317       BUILD_GTEST="false"
53318     fi
53319   else
53320     as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
53321   fi
53322 
53323 
53324 
53325 
53326 ###############################################################################
53327 #
53328 # Check dependencies for external and internal libraries.
53329 #
53330 ###############################################################################
53331 
53332 # After we have toolchain, we can compile fixpath. It's needed by the lib checks.
53333 
53334   # When using cygwin or msys, we need a wrapper binary that renames
53335   # /cygdrive/c/ arguments into c:/ arguments and peeks into
53336   # @files and rewrites these too! This wrapper binary is
53337   # called fixpath.
53338   FIXPATH=
53339   if test "x$OPENJDK_BUILD_OS" = xwindows; then
53340     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
53341 $as_echo_n "checking if fixpath can be created... " >&6; }
53342     FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
53343     FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
53344     FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
53345     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
53346       # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
53347       FIXPATH="$FIXPATH_BIN -c"
53348     elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
53349       # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
53350       # @ was chosen as separator to minimize risk of other tools messing around with it
53351       all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
53352           | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
53353       fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
53354       FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
53355     fi
53356     FIXPATH_SRC_W="$FIXPATH_SRC"
53357     FIXPATH_BIN_W="$FIXPATH_BIN"
53358 
53359   unix_path="$FIXPATH_SRC_W"
53360   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53361     windows_path=`$CYGPATH -m "$unix_path"`
53362     FIXPATH_SRC_W="$windows_path"
53363   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53364     windows_path=`cmd //c echo $unix_path`
53365     FIXPATH_SRC_W="$windows_path"
53366   fi
53367 
53368 
53369   unix_path="$FIXPATH_BIN_W"
53370   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53371     windows_path=`$CYGPATH -m "$unix_path"`
53372     FIXPATH_BIN_W="$windows_path"
53373   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53374     windows_path=`cmd //c echo $unix_path`
53375     FIXPATH_BIN_W="$windows_path"
53376   fi
53377 
53378     $RM -rf $FIXPATH_BIN $FIXPATH_DIR
53379     $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
53380     cd $FIXPATH_DIR
53381     $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
53382     cd $CURDIR
53383 
53384     if test ! -x $FIXPATH_BIN; then
53385       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53386 $as_echo "no" >&6; }
53387       cat $FIXPATH_DIR/fixpath1.log
53388       as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
53389     fi
53390     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53391 $as_echo "yes" >&6; }
53392     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
53393 $as_echo_n "checking if fixpath.exe works... " >&6; }
53394     cd $FIXPATH_DIR
53395     $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
53396         > $FIXPATH_DIR/fixpath2.log 2>&1
53397     cd $CURDIR
53398     if test ! -x $FIXPATH_DIR/fixpath2.exe; then
53399       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53400 $as_echo "no" >&6; }
53401       cat $FIXPATH_DIR/fixpath2.log
53402       as_fn_error $? "fixpath did not work!" "$LINENO" 5
53403     fi
53404     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53405 $as_echo "yes" >&6; }
53406 
53407     FIXPATH_DETACH_FLAG="--detach"
53408   fi
53409 
53410 
53411 
53412 
53413 
53414 
53415   # Check if X11 is needed
53416   if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
53417     # No X11 support on windows or macosx
53418     NEEDS_LIB_X11=false
53419   else
53420     # All other instances need X11, even if building headless only, libawt still
53421     # needs X11 headers.
53422     NEEDS_LIB_X11=true
53423   fi
53424 
53425   # Check if cups is needed
53426   if test "x$OPENJDK_TARGET_OS" = xwindows; then
53427     # Windows have a separate print system
53428     NEEDS_LIB_CUPS=false
53429   else
53430     NEEDS_LIB_CUPS=true
53431   fi
53432 
53433   # A custom hook may have set this already
53434   if test "x$NEEDS_LIB_FREETYPE" = "x"; then
53435     NEEDS_LIB_FREETYPE=true
53436   fi
53437 
53438   # Check if alsa is needed
53439   if test "x$OPENJDK_TARGET_OS" = xlinux; then
53440     NEEDS_LIB_ALSA=true
53441   else
53442     NEEDS_LIB_ALSA=false
53443   fi
53444 
53445   # Check if ffi is needed
53446   if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53447     NEEDS_LIB_FFI=true
53448   else
53449     NEEDS_LIB_FFI=false
53450   fi
53451 
53452 
53453   # statically link libstdc++ before C++ ABI is stablized on Linux unless
53454   # dynamic build is configured on command line.
53455 
53456 # Check whether --with-stdc++lib was given.
53457 if test "${with_stdc__lib+set}" = set; then :
53458   withval=$with_stdc__lib;
53459         if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
53460                 && test "x$with_stdc__lib" != xdefault; then
53461           as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
53462         fi
53463 
53464 else
53465   with_stdc__lib=default
53466 
53467 fi
53468 
53469 
53470   if test "x$OPENJDK_TARGET_OS" = xlinux; then
53471     # Test if stdc++ can be linked statically.
53472     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
53473 $as_echo_n "checking if static link of stdc++ is possible... " >&6; }
53474     STATIC_STDCXX_FLAGS="-static-libstdc++ -static-libgcc"
53475     ac_ext=cpp
53476 ac_cpp='$CXXCPP $CPPFLAGS'
53477 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53478 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53479 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53480 
53481     OLD_LIBS="$LIBS"
53482     LIBS="$STATIC_STDCXX_FLAGS"
53483     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53484 /* end confdefs.h.  */
53485 
53486 int
53487 main ()
53488 {
53489 return 0;
53490   ;
53491   return 0;
53492 }
53493 _ACEOF
53494 if ac_fn_cxx_try_link "$LINENO"; then :
53495   has_static_libstdcxx=yes
53496 else
53497   has_static_libstdcxx=no
53498 fi
53499 rm -f core conftest.err conftest.$ac_objext \
53500     conftest$ac_exeext conftest.$ac_ext
53501     LIBS="$OLD_LIBS"
53502     ac_ext=cpp
53503 ac_cpp='$CXXCPP $CPPFLAGS'
53504 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53505 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53506 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53507 
53508     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
53509 $as_echo "$has_static_libstdcxx" >&6; }
53510 
53511     if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
53512       as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
53513     fi
53514 
53515     # If dynamic was requested, it's available since it would fail above otherwise.
53516     # If dynamic wasn't requested, go with static unless it isn't available.
53517     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
53518 $as_echo_n "checking how to link with libstdc++... " >&6; }
53519     if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno \
53520         ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53521       { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
53522 $as_echo "dynamic" >&6; }
53523     else
53524       LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
53525       JVM_LDFLAGS="$JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53526       # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53527       # just use the same setting as for the TARGET toolchain.
53528       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53529       { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
53530 $as_echo "static" >&6; }
53531     fi
53532   fi
53533 
53534   # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
53535   if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
53536     LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
53537   fi
53538 
53539 
53540 
53541   # Setup Windows runtime dlls
53542   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
53543 
53544 
53545 # Check whether --with-msvcr-dll was given.
53546 if test "${with_msvcr_dll+set}" = set; then :
53547   withval=$with_msvcr_dll;
53548 fi
53549 
53550 
53551   if test "x$with_msvcr_dll" != x; then
53552     # If given explicitly by user, do not probe. If not present, fail directly.
53553 
53554   DLL_NAME="$MSVCR_NAME"
53555   POSSIBLE_MSVC_DLL="$with_msvcr_dll"
53556   METHOD="--with-msvcr-dll"
53557   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53558     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53559 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53560 
53561     # Need to check if the found msvcr is correct architecture
53562     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53563 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53564     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53565     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53566       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53567       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53568       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53569         CORRECT_MSVCR_ARCH="PE32 executable"
53570       else
53571         CORRECT_MSVCR_ARCH="PE32+ executable"
53572       fi
53573     else
53574       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53575         CORRECT_MSVCR_ARCH=386
53576       else
53577         CORRECT_MSVCR_ARCH=x86-64
53578       fi
53579     fi
53580     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53581       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53582 $as_echo "ok" >&6; }
53583       MSVC_DLL="$POSSIBLE_MSVC_DLL"
53584 
53585   # Only process if variable expands to non-empty
53586 
53587   if test "x$MSVC_DLL" != x; then
53588     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53589 
53590   # Input might be given as Windows format, start by converting to
53591   # unix format.
53592   path="$MSVC_DLL"
53593   new_path=`$CYGPATH -u "$path"`
53594 
53595   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53596   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53597   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53598   # "foo.exe" is OK but "foo" is an error.
53599   #
53600   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53601   # It is also a way to make sure we got the proper file name for the real test later on.
53602   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53603   if test "x$test_shortpath" = x; then
53604     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53605 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53606     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53607   fi
53608 
53609   # Call helper function which possibly converts this using DOS-style short mode.
53610   # If so, the updated path is stored in $new_path.
53611 
53612   input_path="$new_path"
53613   # Check if we need to convert this using DOS-style short mode. If the path
53614   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53615   # take no chances and rewrite it.
53616   # Note: m4 eats our [], so we need to use [ and ] instead.
53617   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53618   if test "x$has_forbidden_chars" != x; then
53619     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53620     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53621     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53622     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53623       # Going to short mode and back again did indeed matter. Since short mode is
53624       # case insensitive, let's make it lowercase to improve readability.
53625       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53626       # Now convert it back to Unix-style (cygpath)
53627       input_path=`$CYGPATH -u "$shortmode_path"`
53628       new_path="$input_path"
53629     fi
53630   fi
53631 
53632   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53633   if test "x$test_cygdrive_prefix" = x; then
53634     # As a simple fix, exclude /usr/bin since it's not a real path.
53635     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53636       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53637       # a path prefixed by /cygdrive for fixpath to work.
53638       new_path="$CYGWIN_ROOT_PATH$input_path"
53639     fi
53640   fi
53641 
53642 
53643   if test "x$path" != "x$new_path"; then
53644     MSVC_DLL="$new_path"
53645     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53646 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53647   fi
53648 
53649     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53650 
53651   path="$MSVC_DLL"
53652   has_colon=`$ECHO $path | $GREP ^.:`
53653   new_path="$path"
53654   if test "x$has_colon" = x; then
53655     # Not in mixed or Windows style, start by that.
53656     new_path=`cmd //c echo $path`
53657   fi
53658 
53659 
53660   input_path="$new_path"
53661   # Check if we need to convert this using DOS-style short mode. If the path
53662   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53663   # take no chances and rewrite it.
53664   # Note: m4 eats our [], so we need to use [ and ] instead.
53665   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53666   if test "x$has_forbidden_chars" != x; then
53667     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53668     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53669   fi
53670 
53671 
53672   windows_path="$new_path"
53673   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53674     unix_path=`$CYGPATH -u "$windows_path"`
53675     new_path="$unix_path"
53676   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53677     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53678     new_path="$unix_path"
53679   fi
53680 
53681   if test "x$path" != "x$new_path"; then
53682     MSVC_DLL="$new_path"
53683     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53684 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53685   fi
53686 
53687   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53688   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53689 
53690     else
53691       # We're on a unix platform. Hooray! :)
53692       path="$MSVC_DLL"
53693       has_space=`$ECHO "$path" | $GREP " "`
53694       if test "x$has_space" != x; then
53695         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53696 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53697         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53698       fi
53699 
53700       # Use eval to expand a potential ~
53701       eval path="$path"
53702       if test ! -f "$path" && test ! -d "$path"; then
53703         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53704       fi
53705 
53706       if test -d "$path"; then
53707         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53708       else
53709         dir="`$DIRNAME "$path"`"
53710         base="`$BASENAME "$path"`"
53711         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53712       fi
53713     fi
53714   fi
53715 
53716       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53717 $as_echo_n "checking for $DLL_NAME... " >&6; }
53718       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53719 $as_echo "$MSVC_DLL" >&6; }
53720     else
53721       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53722 $as_echo "incorrect, ignoring" >&6; }
53723       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53724 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53725     fi
53726   fi
53727 
53728     if test "x$MSVC_DLL" = x; then
53729       as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
53730     fi
53731     MSVCR_DLL="$MSVC_DLL"
53732   elif test "x$DEVKIT_MSVCR_DLL" != x; then
53733 
53734   DLL_NAME="$MSVCR_NAME"
53735   POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
53736   METHOD="devkit"
53737   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53738     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53739 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53740 
53741     # Need to check if the found msvcr is correct architecture
53742     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53743 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53744     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53745     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53746       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53747       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53748       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53749         CORRECT_MSVCR_ARCH="PE32 executable"
53750       else
53751         CORRECT_MSVCR_ARCH="PE32+ executable"
53752       fi
53753     else
53754       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53755         CORRECT_MSVCR_ARCH=386
53756       else
53757         CORRECT_MSVCR_ARCH=x86-64
53758       fi
53759     fi
53760     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53761       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53762 $as_echo "ok" >&6; }
53763       MSVC_DLL="$POSSIBLE_MSVC_DLL"
53764 
53765   # Only process if variable expands to non-empty
53766 
53767   if test "x$MSVC_DLL" != x; then
53768     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53769 
53770   # Input might be given as Windows format, start by converting to
53771   # unix format.
53772   path="$MSVC_DLL"
53773   new_path=`$CYGPATH -u "$path"`
53774 
53775   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53776   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53777   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53778   # "foo.exe" is OK but "foo" is an error.
53779   #
53780   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53781   # It is also a way to make sure we got the proper file name for the real test later on.
53782   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53783   if test "x$test_shortpath" = x; then
53784     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53785 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53786     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53787   fi
53788 
53789   # Call helper function which possibly converts this using DOS-style short mode.
53790   # If so, the updated path is stored in $new_path.
53791 
53792   input_path="$new_path"
53793   # Check if we need to convert this using DOS-style short mode. If the path
53794   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53795   # take no chances and rewrite it.
53796   # Note: m4 eats our [], so we need to use [ and ] instead.
53797   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53798   if test "x$has_forbidden_chars" != x; then
53799     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53800     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53801     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53802     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53803       # Going to short mode and back again did indeed matter. Since short mode is
53804       # case insensitive, let's make it lowercase to improve readability.
53805       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53806       # Now convert it back to Unix-style (cygpath)
53807       input_path=`$CYGPATH -u "$shortmode_path"`
53808       new_path="$input_path"
53809     fi
53810   fi
53811 
53812   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53813   if test "x$test_cygdrive_prefix" = x; then
53814     # As a simple fix, exclude /usr/bin since it's not a real path.
53815     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53816       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53817       # a path prefixed by /cygdrive for fixpath to work.
53818       new_path="$CYGWIN_ROOT_PATH$input_path"
53819     fi
53820   fi
53821 
53822 
53823   if test "x$path" != "x$new_path"; then
53824     MSVC_DLL="$new_path"
53825     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53826 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53827   fi
53828 
53829     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53830 
53831   path="$MSVC_DLL"
53832   has_colon=`$ECHO $path | $GREP ^.:`
53833   new_path="$path"
53834   if test "x$has_colon" = x; then
53835     # Not in mixed or Windows style, start by that.
53836     new_path=`cmd //c echo $path`
53837   fi
53838 
53839 
53840   input_path="$new_path"
53841   # Check if we need to convert this using DOS-style short mode. If the path
53842   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53843   # take no chances and rewrite it.
53844   # Note: m4 eats our [], so we need to use [ and ] instead.
53845   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53846   if test "x$has_forbidden_chars" != x; then
53847     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53848     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53849   fi
53850 
53851 
53852   windows_path="$new_path"
53853   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53854     unix_path=`$CYGPATH -u "$windows_path"`
53855     new_path="$unix_path"
53856   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53857     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53858     new_path="$unix_path"
53859   fi
53860 
53861   if test "x$path" != "x$new_path"; then
53862     MSVC_DLL="$new_path"
53863     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53864 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53865   fi
53866 
53867   # Save the first 10 bytes of this path to the storage, so fixpath can work.
53868   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53869 
53870     else
53871       # We're on a unix platform. Hooray! :)
53872       path="$MSVC_DLL"
53873       has_space=`$ECHO "$path" | $GREP " "`
53874       if test "x$has_space" != x; then
53875         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53876 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53877         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53878       fi
53879 
53880       # Use eval to expand a potential ~
53881       eval path="$path"
53882       if test ! -f "$path" && test ! -d "$path"; then
53883         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53884       fi
53885 
53886       if test -d "$path"; then
53887         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53888       else
53889         dir="`$DIRNAME "$path"`"
53890         base="`$BASENAME "$path"`"
53891         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53892       fi
53893     fi
53894   fi
53895 
53896       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53897 $as_echo_n "checking for $DLL_NAME... " >&6; }
53898       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53899 $as_echo "$MSVC_DLL" >&6; }
53900     else
53901       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53902 $as_echo "incorrect, ignoring" >&6; }
53903       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53904 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53905     fi
53906   fi
53907 
53908     if test "x$MSVC_DLL" = x; then
53909       as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
53910     fi
53911     MSVCR_DLL="$MSVC_DLL"
53912   else
53913 
53914   DLL_NAME="${MSVCR_NAME}"
53915   MSVC_DLL=
53916 
53917   if test "x$MSVC_DLL" = x; then
53918     # Probe: Using well-known location from Visual Studio 10.0
53919     if test "x$VCINSTALLDIR" != x; then
53920       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
53921 
53922   windows_path="$CYGWIN_VC_INSTALL_DIR"
53923   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53924     unix_path=`$CYGPATH -u "$windows_path"`
53925     CYGWIN_VC_INSTALL_DIR="$unix_path"
53926   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53927     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53928     CYGWIN_VC_INSTALL_DIR="$unix_path"
53929   fi
53930 
53931       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53932         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53933       else
53934         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53935       fi
53936       $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
53937 
53938   DLL_NAME="$DLL_NAME"
53939   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53940   METHOD="well-known location in VCINSTALLDIR"
53941   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53942     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53943 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53944 
53945     # Need to check if the found msvcr is correct architecture
53946     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53947 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53948     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53949     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53950       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53951       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53952       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53953         CORRECT_MSVCR_ARCH="PE32 executable"
53954       else
53955         CORRECT_MSVCR_ARCH="PE32+ executable"
53956       fi
53957     else
53958       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53959         CORRECT_MSVCR_ARCH=386
53960       else
53961         CORRECT_MSVCR_ARCH=x86-64
53962       fi
53963     fi
53964     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53965       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53966 $as_echo "ok" >&6; }
53967       MSVC_DLL="$POSSIBLE_MSVC_DLL"
53968 
53969   # Only process if variable expands to non-empty
53970 
53971   if test "x$MSVC_DLL" != x; then
53972     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53973 
53974   # Input might be given as Windows format, start by converting to
53975   # unix format.
53976   path="$MSVC_DLL"
53977   new_path=`$CYGPATH -u "$path"`
53978 
53979   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53980   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53981   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53982   # "foo.exe" is OK but "foo" is an error.
53983   #
53984   # This test is therefore slightly more accurate than "test -f" to check for file precense.
53985   # It is also a way to make sure we got the proper file name for the real test later on.
53986   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53987   if test "x$test_shortpath" = x; then
53988     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53989 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53990     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53991   fi
53992 
53993   # Call helper function which possibly converts this using DOS-style short mode.
53994   # If so, the updated path is stored in $new_path.
53995 
53996   input_path="$new_path"
53997   # Check if we need to convert this using DOS-style short mode. If the path
53998   # contains just simple characters, use it. Otherwise (spaces, weird characters),
53999   # take no chances and rewrite it.
54000   # Note: m4 eats our [], so we need to use [ and ] instead.
54001   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54002   if test "x$has_forbidden_chars" != x; then
54003     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54004     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54005     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54006     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54007       # Going to short mode and back again did indeed matter. Since short mode is
54008       # case insensitive, let's make it lowercase to improve readability.
54009       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54010       # Now convert it back to Unix-style (cygpath)
54011       input_path=`$CYGPATH -u "$shortmode_path"`
54012       new_path="$input_path"
54013     fi
54014   fi
54015 
54016   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54017   if test "x$test_cygdrive_prefix" = x; then
54018     # As a simple fix, exclude /usr/bin since it's not a real path.
54019     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54020       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54021       # a path prefixed by /cygdrive for fixpath to work.
54022       new_path="$CYGWIN_ROOT_PATH$input_path"
54023     fi
54024   fi
54025 
54026 
54027   if test "x$path" != "x$new_path"; then
54028     MSVC_DLL="$new_path"
54029     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54030 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54031   fi
54032 
54033     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54034 
54035   path="$MSVC_DLL"
54036   has_colon=`$ECHO $path | $GREP ^.:`
54037   new_path="$path"
54038   if test "x$has_colon" = x; then
54039     # Not in mixed or Windows style, start by that.
54040     new_path=`cmd //c echo $path`
54041   fi
54042 
54043 
54044   input_path="$new_path"
54045   # Check if we need to convert this using DOS-style short mode. If the path
54046   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54047   # take no chances and rewrite it.
54048   # Note: m4 eats our [], so we need to use [ and ] instead.
54049   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54050   if test "x$has_forbidden_chars" != x; then
54051     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54052     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54053   fi
54054 
54055 
54056   windows_path="$new_path"
54057   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54058     unix_path=`$CYGPATH -u "$windows_path"`
54059     new_path="$unix_path"
54060   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54061     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54062     new_path="$unix_path"
54063   fi
54064 
54065   if test "x$path" != "x$new_path"; then
54066     MSVC_DLL="$new_path"
54067     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54068 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54069   fi
54070 
54071   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54072   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54073 
54074     else
54075       # We're on a unix platform. Hooray! :)
54076       path="$MSVC_DLL"
54077       has_space=`$ECHO "$path" | $GREP " "`
54078       if test "x$has_space" != x; then
54079         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54080 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54081         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54082       fi
54083 
54084       # Use eval to expand a potential ~
54085       eval path="$path"
54086       if test ! -f "$path" && test ! -d "$path"; then
54087         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54088       fi
54089 
54090       if test -d "$path"; then
54091         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54092       else
54093         dir="`$DIRNAME "$path"`"
54094         base="`$BASENAME "$path"`"
54095         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54096       fi
54097     fi
54098   fi
54099 
54100       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54101 $as_echo_n "checking for $DLL_NAME... " >&6; }
54102       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54103 $as_echo "$MSVC_DLL" >&6; }
54104     else
54105       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54106 $as_echo "incorrect, ignoring" >&6; }
54107       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54108 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54109     fi
54110   fi
54111 
54112     fi
54113   fi
54114 
54115   if test "x$MSVC_DLL" = x; then
54116     # Probe: Check in the Boot JDK directory.
54117     POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
54118 
54119   DLL_NAME="$DLL_NAME"
54120   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54121   METHOD="well-known location in Boot JDK"
54122   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54123     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54124 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54125 
54126     # Need to check if the found msvcr is correct architecture
54127     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54128 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54129     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54130     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54131       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54132       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54133       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54134         CORRECT_MSVCR_ARCH="PE32 executable"
54135       else
54136         CORRECT_MSVCR_ARCH="PE32+ executable"
54137       fi
54138     else
54139       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54140         CORRECT_MSVCR_ARCH=386
54141       else
54142         CORRECT_MSVCR_ARCH=x86-64
54143       fi
54144     fi
54145     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54146       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54147 $as_echo "ok" >&6; }
54148       MSVC_DLL="$POSSIBLE_MSVC_DLL"
54149 
54150   # Only process if variable expands to non-empty
54151 
54152   if test "x$MSVC_DLL" != x; then
54153     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54154 
54155   # Input might be given as Windows format, start by converting to
54156   # unix format.
54157   path="$MSVC_DLL"
54158   new_path=`$CYGPATH -u "$path"`
54159 
54160   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54161   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54162   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54163   # "foo.exe" is OK but "foo" is an error.
54164   #
54165   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54166   # It is also a way to make sure we got the proper file name for the real test later on.
54167   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54168   if test "x$test_shortpath" = x; then
54169     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54170 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54171     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54172   fi
54173 
54174   # Call helper function which possibly converts this using DOS-style short mode.
54175   # If so, the updated path is stored in $new_path.
54176 
54177   input_path="$new_path"
54178   # Check if we need to convert this using DOS-style short mode. If the path
54179   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54180   # take no chances and rewrite it.
54181   # Note: m4 eats our [], so we need to use [ and ] instead.
54182   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54183   if test "x$has_forbidden_chars" != x; then
54184     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54185     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54186     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54187     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54188       # Going to short mode and back again did indeed matter. Since short mode is
54189       # case insensitive, let's make it lowercase to improve readability.
54190       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54191       # Now convert it back to Unix-style (cygpath)
54192       input_path=`$CYGPATH -u "$shortmode_path"`
54193       new_path="$input_path"
54194     fi
54195   fi
54196 
54197   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54198   if test "x$test_cygdrive_prefix" = x; then
54199     # As a simple fix, exclude /usr/bin since it's not a real path.
54200     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54201       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54202       # a path prefixed by /cygdrive for fixpath to work.
54203       new_path="$CYGWIN_ROOT_PATH$input_path"
54204     fi
54205   fi
54206 
54207 
54208   if test "x$path" != "x$new_path"; then
54209     MSVC_DLL="$new_path"
54210     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54211 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54212   fi
54213 
54214     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54215 
54216   path="$MSVC_DLL"
54217   has_colon=`$ECHO $path | $GREP ^.:`
54218   new_path="$path"
54219   if test "x$has_colon" = x; then
54220     # Not in mixed or Windows style, start by that.
54221     new_path=`cmd //c echo $path`
54222   fi
54223 
54224 
54225   input_path="$new_path"
54226   # Check if we need to convert this using DOS-style short mode. If the path
54227   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54228   # take no chances and rewrite it.
54229   # Note: m4 eats our [], so we need to use [ and ] instead.
54230   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54231   if test "x$has_forbidden_chars" != x; then
54232     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54233     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54234   fi
54235 
54236 
54237   windows_path="$new_path"
54238   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54239     unix_path=`$CYGPATH -u "$windows_path"`
54240     new_path="$unix_path"
54241   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54242     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54243     new_path="$unix_path"
54244   fi
54245 
54246   if test "x$path" != "x$new_path"; then
54247     MSVC_DLL="$new_path"
54248     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54249 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54250   fi
54251 
54252   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54253   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54254 
54255     else
54256       # We're on a unix platform. Hooray! :)
54257       path="$MSVC_DLL"
54258       has_space=`$ECHO "$path" | $GREP " "`
54259       if test "x$has_space" != x; then
54260         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54261 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54262         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54263       fi
54264 
54265       # Use eval to expand a potential ~
54266       eval path="$path"
54267       if test ! -f "$path" && test ! -d "$path"; then
54268         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54269       fi
54270 
54271       if test -d "$path"; then
54272         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54273       else
54274         dir="`$DIRNAME "$path"`"
54275         base="`$BASENAME "$path"`"
54276         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54277       fi
54278     fi
54279   fi
54280 
54281       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54282 $as_echo_n "checking for $DLL_NAME... " >&6; }
54283       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54284 $as_echo "$MSVC_DLL" >&6; }
54285     else
54286       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54287 $as_echo "incorrect, ignoring" >&6; }
54288       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54289 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54290     fi
54291   fi
54292 
54293   fi
54294 
54295   if test "x$MSVC_DLL" = x; then
54296     # Probe: Look in the Windows system32 directory
54297     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
54298 
54299   windows_path="$CYGWIN_SYSTEMROOT"
54300   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54301     unix_path=`$CYGPATH -u "$windows_path"`
54302     CYGWIN_SYSTEMROOT="$unix_path"
54303   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54304     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54305     CYGWIN_SYSTEMROOT="$unix_path"
54306   fi
54307 
54308     POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
54309 
54310   DLL_NAME="$DLL_NAME"
54311   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54312   METHOD="well-known location in SYSTEMROOT"
54313   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54314     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54315 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54316 
54317     # Need to check if the found msvcr is correct architecture
54318     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54319 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54320     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54321     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54322       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54323       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54324       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54325         CORRECT_MSVCR_ARCH="PE32 executable"
54326       else
54327         CORRECT_MSVCR_ARCH="PE32+ executable"
54328       fi
54329     else
54330       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54331         CORRECT_MSVCR_ARCH=386
54332       else
54333         CORRECT_MSVCR_ARCH=x86-64
54334       fi
54335     fi
54336     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54337       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54338 $as_echo "ok" >&6; }
54339       MSVC_DLL="$POSSIBLE_MSVC_DLL"
54340 
54341   # Only process if variable expands to non-empty
54342 
54343   if test "x$MSVC_DLL" != x; then
54344     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54345 
54346   # Input might be given as Windows format, start by converting to
54347   # unix format.
54348   path="$MSVC_DLL"
54349   new_path=`$CYGPATH -u "$path"`
54350 
54351   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54352   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54353   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54354   # "foo.exe" is OK but "foo" is an error.
54355   #
54356   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54357   # It is also a way to make sure we got the proper file name for the real test later on.
54358   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54359   if test "x$test_shortpath" = x; then
54360     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54361 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54362     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54363   fi
54364 
54365   # Call helper function which possibly converts this using DOS-style short mode.
54366   # If so, the updated path is stored in $new_path.
54367 
54368   input_path="$new_path"
54369   # Check if we need to convert this using DOS-style short mode. If the path
54370   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54371   # take no chances and rewrite it.
54372   # Note: m4 eats our [], so we need to use [ and ] instead.
54373   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54374   if test "x$has_forbidden_chars" != x; then
54375     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54376     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54377     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54378     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54379       # Going to short mode and back again did indeed matter. Since short mode is
54380       # case insensitive, let's make it lowercase to improve readability.
54381       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54382       # Now convert it back to Unix-style (cygpath)
54383       input_path=`$CYGPATH -u "$shortmode_path"`
54384       new_path="$input_path"
54385     fi
54386   fi
54387 
54388   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54389   if test "x$test_cygdrive_prefix" = x; then
54390     # As a simple fix, exclude /usr/bin since it's not a real path.
54391     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54392       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54393       # a path prefixed by /cygdrive for fixpath to work.
54394       new_path="$CYGWIN_ROOT_PATH$input_path"
54395     fi
54396   fi
54397 
54398 
54399   if test "x$path" != "x$new_path"; then
54400     MSVC_DLL="$new_path"
54401     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54402 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54403   fi
54404 
54405     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54406 
54407   path="$MSVC_DLL"
54408   has_colon=`$ECHO $path | $GREP ^.:`
54409   new_path="$path"
54410   if test "x$has_colon" = x; then
54411     # Not in mixed or Windows style, start by that.
54412     new_path=`cmd //c echo $path`
54413   fi
54414 
54415 
54416   input_path="$new_path"
54417   # Check if we need to convert this using DOS-style short mode. If the path
54418   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54419   # take no chances and rewrite it.
54420   # Note: m4 eats our [], so we need to use [ and ] instead.
54421   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54422   if test "x$has_forbidden_chars" != x; then
54423     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54424     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54425   fi
54426 
54427 
54428   windows_path="$new_path"
54429   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54430     unix_path=`$CYGPATH -u "$windows_path"`
54431     new_path="$unix_path"
54432   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54433     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54434     new_path="$unix_path"
54435   fi
54436 
54437   if test "x$path" != "x$new_path"; then
54438     MSVC_DLL="$new_path"
54439     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54440 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54441   fi
54442 
54443   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54444   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54445 
54446     else
54447       # We're on a unix platform. Hooray! :)
54448       path="$MSVC_DLL"
54449       has_space=`$ECHO "$path" | $GREP " "`
54450       if test "x$has_space" != x; then
54451         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54452 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54453         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54454       fi
54455 
54456       # Use eval to expand a potential ~
54457       eval path="$path"
54458       if test ! -f "$path" && test ! -d "$path"; then
54459         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54460       fi
54461 
54462       if test -d "$path"; then
54463         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54464       else
54465         dir="`$DIRNAME "$path"`"
54466         base="`$BASENAME "$path"`"
54467         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54468       fi
54469     fi
54470   fi
54471 
54472       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54473 $as_echo_n "checking for $DLL_NAME... " >&6; }
54474       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54475 $as_echo "$MSVC_DLL" >&6; }
54476     else
54477       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54478 $as_echo "incorrect, ignoring" >&6; }
54479       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54480 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54481     fi
54482   fi
54483 
54484   fi
54485 
54486   if test "x$MSVC_DLL" = x; then
54487     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
54488     if test "x$VS100COMNTOOLS" != x; then
54489       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
54490 
54491   windows_path="$CYGWIN_VS_TOOLS_DIR"
54492   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54493     unix_path=`$CYGPATH -u "$windows_path"`
54494     CYGWIN_VS_TOOLS_DIR="$unix_path"
54495   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54496     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54497     CYGWIN_VS_TOOLS_DIR="$unix_path"
54498   fi
54499 
54500       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54501         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54502             | $GREP -i /x64/ | $HEAD --lines 1`
54503       else
54504         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54505             | $GREP -i /x86/ | $HEAD --lines 1`
54506       fi
54507 
54508   DLL_NAME="$DLL_NAME"
54509   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54510   METHOD="search of VS100COMNTOOLS"
54511   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54512     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54513 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54514 
54515     # Need to check if the found msvcr is correct architecture
54516     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54517 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54518     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54519     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54520       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54521       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54522       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54523         CORRECT_MSVCR_ARCH="PE32 executable"
54524       else
54525         CORRECT_MSVCR_ARCH="PE32+ executable"
54526       fi
54527     else
54528       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54529         CORRECT_MSVCR_ARCH=386
54530       else
54531         CORRECT_MSVCR_ARCH=x86-64
54532       fi
54533     fi
54534     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54535       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54536 $as_echo "ok" >&6; }
54537       MSVC_DLL="$POSSIBLE_MSVC_DLL"
54538 
54539   # Only process if variable expands to non-empty
54540 
54541   if test "x$MSVC_DLL" != x; then
54542     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54543 
54544   # Input might be given as Windows format, start by converting to
54545   # unix format.
54546   path="$MSVC_DLL"
54547   new_path=`$CYGPATH -u "$path"`
54548 
54549   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54550   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54551   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54552   # "foo.exe" is OK but "foo" is an error.
54553   #
54554   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54555   # It is also a way to make sure we got the proper file name for the real test later on.
54556   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54557   if test "x$test_shortpath" = x; then
54558     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54559 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54560     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54561   fi
54562 
54563   # Call helper function which possibly converts this using DOS-style short mode.
54564   # If so, the updated path is stored in $new_path.
54565 
54566   input_path="$new_path"
54567   # Check if we need to convert this using DOS-style short mode. If the path
54568   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54569   # take no chances and rewrite it.
54570   # Note: m4 eats our [], so we need to use [ and ] instead.
54571   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54572   if test "x$has_forbidden_chars" != x; then
54573     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54574     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54575     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54576     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54577       # Going to short mode and back again did indeed matter. Since short mode is
54578       # case insensitive, let's make it lowercase to improve readability.
54579       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54580       # Now convert it back to Unix-style (cygpath)
54581       input_path=`$CYGPATH -u "$shortmode_path"`
54582       new_path="$input_path"
54583     fi
54584   fi
54585 
54586   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54587   if test "x$test_cygdrive_prefix" = x; then
54588     # As a simple fix, exclude /usr/bin since it's not a real path.
54589     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54590       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54591       # a path prefixed by /cygdrive for fixpath to work.
54592       new_path="$CYGWIN_ROOT_PATH$input_path"
54593     fi
54594   fi
54595 
54596 
54597   if test "x$path" != "x$new_path"; then
54598     MSVC_DLL="$new_path"
54599     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54600 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54601   fi
54602 
54603     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54604 
54605   path="$MSVC_DLL"
54606   has_colon=`$ECHO $path | $GREP ^.:`
54607   new_path="$path"
54608   if test "x$has_colon" = x; then
54609     # Not in mixed or Windows style, start by that.
54610     new_path=`cmd //c echo $path`
54611   fi
54612 
54613 
54614   input_path="$new_path"
54615   # Check if we need to convert this using DOS-style short mode. If the path
54616   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54617   # take no chances and rewrite it.
54618   # Note: m4 eats our [], so we need to use [ and ] instead.
54619   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54620   if test "x$has_forbidden_chars" != x; then
54621     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54622     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54623   fi
54624 
54625 
54626   windows_path="$new_path"
54627   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54628     unix_path=`$CYGPATH -u "$windows_path"`
54629     new_path="$unix_path"
54630   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54631     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54632     new_path="$unix_path"
54633   fi
54634 
54635   if test "x$path" != "x$new_path"; then
54636     MSVC_DLL="$new_path"
54637     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54638 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54639   fi
54640 
54641   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54642   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54643 
54644     else
54645       # We're on a unix platform. Hooray! :)
54646       path="$MSVC_DLL"
54647       has_space=`$ECHO "$path" | $GREP " "`
54648       if test "x$has_space" != x; then
54649         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54650 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54651         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54652       fi
54653 
54654       # Use eval to expand a potential ~
54655       eval path="$path"
54656       if test ! -f "$path" && test ! -d "$path"; then
54657         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54658       fi
54659 
54660       if test -d "$path"; then
54661         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54662       else
54663         dir="`$DIRNAME "$path"`"
54664         base="`$BASENAME "$path"`"
54665         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54666       fi
54667     fi
54668   fi
54669 
54670       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54671 $as_echo_n "checking for $DLL_NAME... " >&6; }
54672       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54673 $as_echo "$MSVC_DLL" >&6; }
54674     else
54675       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54676 $as_echo "incorrect, ignoring" >&6; }
54677       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54678 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54679     fi
54680   fi
54681 
54682     fi
54683   fi
54684 
54685   if test "x$MSVC_DLL" = x; then
54686     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
54687     # (This was the original behaviour; kept since it might turn something up)
54688     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
54689       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54690         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54691             | $GREP x64 | $HEAD --lines 1`
54692       else
54693         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54694             | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
54695         if test "x$POSSIBLE_MSVC_DLL" = x; then
54696           # We're grasping at straws now...
54697           POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54698               | $HEAD --lines 1`
54699         fi
54700       fi
54701 
54702 
54703   DLL_NAME="$DLL_NAME"
54704   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54705   METHOD="search of VCINSTALLDIR"
54706   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54707     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54708 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54709 
54710     # Need to check if the found msvcr is correct architecture
54711     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54712 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54713     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54714     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54715       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54716       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54717       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54718         CORRECT_MSVCR_ARCH="PE32 executable"
54719       else
54720         CORRECT_MSVCR_ARCH="PE32+ executable"
54721       fi
54722     else
54723       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54724         CORRECT_MSVCR_ARCH=386
54725       else
54726         CORRECT_MSVCR_ARCH=x86-64
54727       fi
54728     fi
54729     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54730       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54731 $as_echo "ok" >&6; }
54732       MSVC_DLL="$POSSIBLE_MSVC_DLL"
54733 
54734   # Only process if variable expands to non-empty
54735 
54736   if test "x$MSVC_DLL" != x; then
54737     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54738 
54739   # Input might be given as Windows format, start by converting to
54740   # unix format.
54741   path="$MSVC_DLL"
54742   new_path=`$CYGPATH -u "$path"`
54743 
54744   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54745   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54746   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54747   # "foo.exe" is OK but "foo" is an error.
54748   #
54749   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54750   # It is also a way to make sure we got the proper file name for the real test later on.
54751   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54752   if test "x$test_shortpath" = x; then
54753     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54754 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54755     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54756   fi
54757 
54758   # Call helper function which possibly converts this using DOS-style short mode.
54759   # If so, the updated path is stored in $new_path.
54760 
54761   input_path="$new_path"
54762   # Check if we need to convert this using DOS-style short mode. If the path
54763   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54764   # take no chances and rewrite it.
54765   # Note: m4 eats our [], so we need to use [ and ] instead.
54766   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54767   if test "x$has_forbidden_chars" != x; then
54768     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54769     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54770     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54771     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54772       # Going to short mode and back again did indeed matter. Since short mode is
54773       # case insensitive, let's make it lowercase to improve readability.
54774       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54775       # Now convert it back to Unix-style (cygpath)
54776       input_path=`$CYGPATH -u "$shortmode_path"`
54777       new_path="$input_path"
54778     fi
54779   fi
54780 
54781   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54782   if test "x$test_cygdrive_prefix" = x; then
54783     # As a simple fix, exclude /usr/bin since it's not a real path.
54784     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54785       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54786       # a path prefixed by /cygdrive for fixpath to work.
54787       new_path="$CYGWIN_ROOT_PATH$input_path"
54788     fi
54789   fi
54790 
54791 
54792   if test "x$path" != "x$new_path"; then
54793     MSVC_DLL="$new_path"
54794     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54795 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54796   fi
54797 
54798     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54799 
54800   path="$MSVC_DLL"
54801   has_colon=`$ECHO $path | $GREP ^.:`
54802   new_path="$path"
54803   if test "x$has_colon" = x; then
54804     # Not in mixed or Windows style, start by that.
54805     new_path=`cmd //c echo $path`
54806   fi
54807 
54808 
54809   input_path="$new_path"
54810   # Check if we need to convert this using DOS-style short mode. If the path
54811   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54812   # take no chances and rewrite it.
54813   # Note: m4 eats our [], so we need to use [ and ] instead.
54814   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54815   if test "x$has_forbidden_chars" != x; then
54816     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54817     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54818   fi
54819 
54820 
54821   windows_path="$new_path"
54822   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54823     unix_path=`$CYGPATH -u "$windows_path"`
54824     new_path="$unix_path"
54825   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54826     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54827     new_path="$unix_path"
54828   fi
54829 
54830   if test "x$path" != "x$new_path"; then
54831     MSVC_DLL="$new_path"
54832     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54833 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54834   fi
54835 
54836   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54837   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54838 
54839     else
54840       # We're on a unix platform. Hooray! :)
54841       path="$MSVC_DLL"
54842       has_space=`$ECHO "$path" | $GREP " "`
54843       if test "x$has_space" != x; then
54844         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54845 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54846         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54847       fi
54848 
54849       # Use eval to expand a potential ~
54850       eval path="$path"
54851       if test ! -f "$path" && test ! -d "$path"; then
54852         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54853       fi
54854 
54855       if test -d "$path"; then
54856         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54857       else
54858         dir="`$DIRNAME "$path"`"
54859         base="`$BASENAME "$path"`"
54860         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54861       fi
54862     fi
54863   fi
54864 
54865       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54866 $as_echo_n "checking for $DLL_NAME... " >&6; }
54867       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54868 $as_echo "$MSVC_DLL" >&6; }
54869     else
54870       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54871 $as_echo "incorrect, ignoring" >&6; }
54872       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54873 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54874     fi
54875   fi
54876 
54877     fi
54878   fi
54879 
54880   if test "x$MSVC_DLL" = x; then
54881     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54882 $as_echo_n "checking for $DLL_NAME... " >&6; }
54883     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54884 $as_echo "no" >&6; }
54885     as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
54886   fi
54887 
54888     MSVCR_DLL="$MSVC_DLL"
54889   fi
54890 
54891 
54892 
54893 # Check whether --with-msvcp-dll was given.
54894 if test "${with_msvcp_dll+set}" = set; then :
54895   withval=$with_msvcp_dll;
54896 fi
54897 
54898 
54899   if test "x$MSVCP_NAME" != "x"; then
54900     if test "x$with_msvcp_dll" != x; then
54901       # If given explicitly by user, do not probe. If not present, fail directly.
54902 
54903   DLL_NAME="$MSVCP_NAME"
54904   POSSIBLE_MSVC_DLL="$with_msvcp_dll"
54905   METHOD="--with-msvcp-dll"
54906   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54907     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54908 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54909 
54910     # Need to check if the found msvcr is correct architecture
54911     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54912 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54913     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54914     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54915       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54916       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54917       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54918         CORRECT_MSVCR_ARCH="PE32 executable"
54919       else
54920         CORRECT_MSVCR_ARCH="PE32+ executable"
54921       fi
54922     else
54923       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54924         CORRECT_MSVCR_ARCH=386
54925       else
54926         CORRECT_MSVCR_ARCH=x86-64
54927       fi
54928     fi
54929     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54930       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54931 $as_echo "ok" >&6; }
54932       MSVC_DLL="$POSSIBLE_MSVC_DLL"
54933 
54934   # Only process if variable expands to non-empty
54935 
54936   if test "x$MSVC_DLL" != x; then
54937     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54938 
54939   # Input might be given as Windows format, start by converting to
54940   # unix format.
54941   path="$MSVC_DLL"
54942   new_path=`$CYGPATH -u "$path"`
54943 
54944   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54945   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54946   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54947   # "foo.exe" is OK but "foo" is an error.
54948   #
54949   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54950   # It is also a way to make sure we got the proper file name for the real test later on.
54951   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54952   if test "x$test_shortpath" = x; then
54953     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54954 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54955     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54956   fi
54957 
54958   # Call helper function which possibly converts this using DOS-style short mode.
54959   # If so, the updated path is stored in $new_path.
54960 
54961   input_path="$new_path"
54962   # Check if we need to convert this using DOS-style short mode. If the path
54963   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54964   # take no chances and rewrite it.
54965   # Note: m4 eats our [], so we need to use [ and ] instead.
54966   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54967   if test "x$has_forbidden_chars" != x; then
54968     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54969     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54970     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54971     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54972       # Going to short mode and back again did indeed matter. Since short mode is
54973       # case insensitive, let's make it lowercase to improve readability.
54974       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54975       # Now convert it back to Unix-style (cygpath)
54976       input_path=`$CYGPATH -u "$shortmode_path"`
54977       new_path="$input_path"
54978     fi
54979   fi
54980 
54981   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54982   if test "x$test_cygdrive_prefix" = x; then
54983     # As a simple fix, exclude /usr/bin since it's not a real path.
54984     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54985       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54986       # a path prefixed by /cygdrive for fixpath to work.
54987       new_path="$CYGWIN_ROOT_PATH$input_path"
54988     fi
54989   fi
54990 
54991 
54992   if test "x$path" != "x$new_path"; then
54993     MSVC_DLL="$new_path"
54994     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54995 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54996   fi
54997 
54998     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54999 
55000   path="$MSVC_DLL"
55001   has_colon=`$ECHO $path | $GREP ^.:`
55002   new_path="$path"
55003   if test "x$has_colon" = x; then
55004     # Not in mixed or Windows style, start by that.
55005     new_path=`cmd //c echo $path`
55006   fi
55007 
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     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55018   fi
55019 
55020 
55021   windows_path="$new_path"
55022   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55023     unix_path=`$CYGPATH -u "$windows_path"`
55024     new_path="$unix_path"
55025   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55026     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55027     new_path="$unix_path"
55028   fi
55029 
55030   if test "x$path" != "x$new_path"; then
55031     MSVC_DLL="$new_path"
55032     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55033 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55034   fi
55035 
55036   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55037   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55038 
55039     else
55040       # We're on a unix platform. Hooray! :)
55041       path="$MSVC_DLL"
55042       has_space=`$ECHO "$path" | $GREP " "`
55043       if test "x$has_space" != x; then
55044         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55045 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55046         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55047       fi
55048 
55049       # Use eval to expand a potential ~
55050       eval path="$path"
55051       if test ! -f "$path" && test ! -d "$path"; then
55052         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55053       fi
55054 
55055       if test -d "$path"; then
55056         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55057       else
55058         dir="`$DIRNAME "$path"`"
55059         base="`$BASENAME "$path"`"
55060         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55061       fi
55062     fi
55063   fi
55064 
55065       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55066 $as_echo_n "checking for $DLL_NAME... " >&6; }
55067       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55068 $as_echo "$MSVC_DLL" >&6; }
55069     else
55070       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55071 $as_echo "incorrect, ignoring" >&6; }
55072       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55073 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55074     fi
55075   fi
55076 
55077       if test "x$MSVC_DLL" = x; then
55078         as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
55079       fi
55080       MSVCP_DLL="$MSVC_DLL"
55081     elif test "x$DEVKIT_MSVCP_DLL" != x; then
55082 
55083   DLL_NAME="$MSVCP_NAME"
55084   POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
55085   METHOD="devkit"
55086   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55087     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55088 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55089 
55090     # Need to check if the found msvcr is correct architecture
55091     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55092 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55093     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55094     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55095       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55096       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55097       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55098         CORRECT_MSVCR_ARCH="PE32 executable"
55099       else
55100         CORRECT_MSVCR_ARCH="PE32+ executable"
55101       fi
55102     else
55103       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55104         CORRECT_MSVCR_ARCH=386
55105       else
55106         CORRECT_MSVCR_ARCH=x86-64
55107       fi
55108     fi
55109     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55110       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55111 $as_echo "ok" >&6; }
55112       MSVC_DLL="$POSSIBLE_MSVC_DLL"
55113 
55114   # Only process if variable expands to non-empty
55115 
55116   if test "x$MSVC_DLL" != x; then
55117     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55118 
55119   # Input might be given as Windows format, start by converting to
55120   # unix format.
55121   path="$MSVC_DLL"
55122   new_path=`$CYGPATH -u "$path"`
55123 
55124   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55125   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55126   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55127   # "foo.exe" is OK but "foo" is an error.
55128   #
55129   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55130   # It is also a way to make sure we got the proper file name for the real test later on.
55131   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55132   if test "x$test_shortpath" = x; then
55133     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55134 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55135     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55136   fi
55137 
55138   # Call helper function which possibly converts this using DOS-style short mode.
55139   # If so, the updated path is stored in $new_path.
55140 
55141   input_path="$new_path"
55142   # Check if we need to convert this using DOS-style short mode. If the path
55143   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55144   # take no chances and rewrite it.
55145   # Note: m4 eats our [], so we need to use [ and ] instead.
55146   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55147   if test "x$has_forbidden_chars" != x; then
55148     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55149     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55150     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55151     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55152       # Going to short mode and back again did indeed matter. Since short mode is
55153       # case insensitive, let's make it lowercase to improve readability.
55154       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55155       # Now convert it back to Unix-style (cygpath)
55156       input_path=`$CYGPATH -u "$shortmode_path"`
55157       new_path="$input_path"
55158     fi
55159   fi
55160 
55161   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55162   if test "x$test_cygdrive_prefix" = x; then
55163     # As a simple fix, exclude /usr/bin since it's not a real path.
55164     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55165       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55166       # a path prefixed by /cygdrive for fixpath to work.
55167       new_path="$CYGWIN_ROOT_PATH$input_path"
55168     fi
55169   fi
55170 
55171 
55172   if test "x$path" != "x$new_path"; then
55173     MSVC_DLL="$new_path"
55174     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55175 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55176   fi
55177 
55178     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55179 
55180   path="$MSVC_DLL"
55181   has_colon=`$ECHO $path | $GREP ^.:`
55182   new_path="$path"
55183   if test "x$has_colon" = x; then
55184     # Not in mixed or Windows style, start by that.
55185     new_path=`cmd //c echo $path`
55186   fi
55187 
55188 
55189   input_path="$new_path"
55190   # Check if we need to convert this using DOS-style short mode. If the path
55191   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55192   # take no chances and rewrite it.
55193   # Note: m4 eats our [], so we need to use [ and ] instead.
55194   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55195   if test "x$has_forbidden_chars" != x; then
55196     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55197     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55198   fi
55199 
55200 
55201   windows_path="$new_path"
55202   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55203     unix_path=`$CYGPATH -u "$windows_path"`
55204     new_path="$unix_path"
55205   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55206     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55207     new_path="$unix_path"
55208   fi
55209 
55210   if test "x$path" != "x$new_path"; then
55211     MSVC_DLL="$new_path"
55212     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55213 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55214   fi
55215 
55216   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55217   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55218 
55219     else
55220       # We're on a unix platform. Hooray! :)
55221       path="$MSVC_DLL"
55222       has_space=`$ECHO "$path" | $GREP " "`
55223       if test "x$has_space" != x; then
55224         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55225 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55226         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55227       fi
55228 
55229       # Use eval to expand a potential ~
55230       eval path="$path"
55231       if test ! -f "$path" && test ! -d "$path"; then
55232         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55233       fi
55234 
55235       if test -d "$path"; then
55236         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55237       else
55238         dir="`$DIRNAME "$path"`"
55239         base="`$BASENAME "$path"`"
55240         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55241       fi
55242     fi
55243   fi
55244 
55245       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55246 $as_echo_n "checking for $DLL_NAME... " >&6; }
55247       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55248 $as_echo "$MSVC_DLL" >&6; }
55249     else
55250       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55251 $as_echo "incorrect, ignoring" >&6; }
55252       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55253 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55254     fi
55255   fi
55256 
55257       if test "x$MSVC_DLL" = x; then
55258         as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
55259       fi
55260       MSVCP_DLL="$MSVC_DLL"
55261     else
55262 
55263   DLL_NAME="${MSVCP_NAME}"
55264   MSVC_DLL=
55265 
55266   if test "x$MSVC_DLL" = x; then
55267     # Probe: Using well-known location from Visual Studio 10.0
55268     if test "x$VCINSTALLDIR" != x; then
55269       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
55270 
55271   windows_path="$CYGWIN_VC_INSTALL_DIR"
55272   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55273     unix_path=`$CYGPATH -u "$windows_path"`
55274     CYGWIN_VC_INSTALL_DIR="$unix_path"
55275   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55276     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55277     CYGWIN_VC_INSTALL_DIR="$unix_path"
55278   fi
55279 
55280       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55281         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
55282       else
55283         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
55284       fi
55285       $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
55286 
55287   DLL_NAME="$DLL_NAME"
55288   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55289   METHOD="well-known location in VCINSTALLDIR"
55290   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55291     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55292 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55293 
55294     # Need to check if the found msvcr is correct architecture
55295     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55296 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55297     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55298     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55299       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55300       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55301       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55302         CORRECT_MSVCR_ARCH="PE32 executable"
55303       else
55304         CORRECT_MSVCR_ARCH="PE32+ executable"
55305       fi
55306     else
55307       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55308         CORRECT_MSVCR_ARCH=386
55309       else
55310         CORRECT_MSVCR_ARCH=x86-64
55311       fi
55312     fi
55313     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55314       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55315 $as_echo "ok" >&6; }
55316       MSVC_DLL="$POSSIBLE_MSVC_DLL"
55317 
55318   # Only process if variable expands to non-empty
55319 
55320   if test "x$MSVC_DLL" != x; then
55321     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55322 
55323   # Input might be given as Windows format, start by converting to
55324   # unix format.
55325   path="$MSVC_DLL"
55326   new_path=`$CYGPATH -u "$path"`
55327 
55328   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55329   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55330   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55331   # "foo.exe" is OK but "foo" is an error.
55332   #
55333   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55334   # It is also a way to make sure we got the proper file name for the real test later on.
55335   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55336   if test "x$test_shortpath" = x; then
55337     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55338 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55339     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55340   fi
55341 
55342   # Call helper function which possibly converts this using DOS-style short mode.
55343   # If so, the updated path is stored in $new_path.
55344 
55345   input_path="$new_path"
55346   # Check if we need to convert this using DOS-style short mode. If the path
55347   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55348   # take no chances and rewrite it.
55349   # Note: m4 eats our [], so we need to use [ and ] instead.
55350   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55351   if test "x$has_forbidden_chars" != x; then
55352     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55353     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55354     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55355     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55356       # Going to short mode and back again did indeed matter. Since short mode is
55357       # case insensitive, let's make it lowercase to improve readability.
55358       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55359       # Now convert it back to Unix-style (cygpath)
55360       input_path=`$CYGPATH -u "$shortmode_path"`
55361       new_path="$input_path"
55362     fi
55363   fi
55364 
55365   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55366   if test "x$test_cygdrive_prefix" = x; then
55367     # As a simple fix, exclude /usr/bin since it's not a real path.
55368     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55369       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55370       # a path prefixed by /cygdrive for fixpath to work.
55371       new_path="$CYGWIN_ROOT_PATH$input_path"
55372     fi
55373   fi
55374 
55375 
55376   if test "x$path" != "x$new_path"; then
55377     MSVC_DLL="$new_path"
55378     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55379 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55380   fi
55381 
55382     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55383 
55384   path="$MSVC_DLL"
55385   has_colon=`$ECHO $path | $GREP ^.:`
55386   new_path="$path"
55387   if test "x$has_colon" = x; then
55388     # Not in mixed or Windows style, start by that.
55389     new_path=`cmd //c echo $path`
55390   fi
55391 
55392 
55393   input_path="$new_path"
55394   # Check if we need to convert this using DOS-style short mode. If the path
55395   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55396   # take no chances and rewrite it.
55397   # Note: m4 eats our [], so we need to use [ and ] instead.
55398   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55399   if test "x$has_forbidden_chars" != x; then
55400     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55401     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55402   fi
55403 
55404 
55405   windows_path="$new_path"
55406   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55407     unix_path=`$CYGPATH -u "$windows_path"`
55408     new_path="$unix_path"
55409   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55410     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55411     new_path="$unix_path"
55412   fi
55413 
55414   if test "x$path" != "x$new_path"; then
55415     MSVC_DLL="$new_path"
55416     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55417 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55418   fi
55419 
55420   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55421   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55422 
55423     else
55424       # We're on a unix platform. Hooray! :)
55425       path="$MSVC_DLL"
55426       has_space=`$ECHO "$path" | $GREP " "`
55427       if test "x$has_space" != x; then
55428         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55429 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55430         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55431       fi
55432 
55433       # Use eval to expand a potential ~
55434       eval path="$path"
55435       if test ! -f "$path" && test ! -d "$path"; then
55436         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55437       fi
55438 
55439       if test -d "$path"; then
55440         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55441       else
55442         dir="`$DIRNAME "$path"`"
55443         base="`$BASENAME "$path"`"
55444         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55445       fi
55446     fi
55447   fi
55448 
55449       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55450 $as_echo_n "checking for $DLL_NAME... " >&6; }
55451       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55452 $as_echo "$MSVC_DLL" >&6; }
55453     else
55454       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55455 $as_echo "incorrect, ignoring" >&6; }
55456       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55457 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55458     fi
55459   fi
55460 
55461     fi
55462   fi
55463 
55464   if test "x$MSVC_DLL" = x; then
55465     # Probe: Check in the Boot JDK directory.
55466     POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
55467 
55468   DLL_NAME="$DLL_NAME"
55469   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55470   METHOD="well-known location in Boot JDK"
55471   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55472     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55473 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55474 
55475     # Need to check if the found msvcr is correct architecture
55476     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55477 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55478     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55479     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55480       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55481       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55482       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55483         CORRECT_MSVCR_ARCH="PE32 executable"
55484       else
55485         CORRECT_MSVCR_ARCH="PE32+ executable"
55486       fi
55487     else
55488       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55489         CORRECT_MSVCR_ARCH=386
55490       else
55491         CORRECT_MSVCR_ARCH=x86-64
55492       fi
55493     fi
55494     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55495       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55496 $as_echo "ok" >&6; }
55497       MSVC_DLL="$POSSIBLE_MSVC_DLL"
55498 
55499   # Only process if variable expands to non-empty
55500 
55501   if test "x$MSVC_DLL" != x; then
55502     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55503 
55504   # Input might be given as Windows format, start by converting to
55505   # unix format.
55506   path="$MSVC_DLL"
55507   new_path=`$CYGPATH -u "$path"`
55508 
55509   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55510   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55511   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55512   # "foo.exe" is OK but "foo" is an error.
55513   #
55514   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55515   # It is also a way to make sure we got the proper file name for the real test later on.
55516   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55517   if test "x$test_shortpath" = x; then
55518     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55519 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55520     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55521   fi
55522 
55523   # Call helper function which possibly converts this using DOS-style short mode.
55524   # If so, the updated path is stored in $new_path.
55525 
55526   input_path="$new_path"
55527   # Check if we need to convert this using DOS-style short mode. If the path
55528   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55529   # take no chances and rewrite it.
55530   # Note: m4 eats our [], so we need to use [ and ] instead.
55531   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55532   if test "x$has_forbidden_chars" != x; then
55533     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55534     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55535     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55536     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55537       # Going to short mode and back again did indeed matter. Since short mode is
55538       # case insensitive, let's make it lowercase to improve readability.
55539       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55540       # Now convert it back to Unix-style (cygpath)
55541       input_path=`$CYGPATH -u "$shortmode_path"`
55542       new_path="$input_path"
55543     fi
55544   fi
55545 
55546   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55547   if test "x$test_cygdrive_prefix" = x; then
55548     # As a simple fix, exclude /usr/bin since it's not a real path.
55549     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55550       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55551       # a path prefixed by /cygdrive for fixpath to work.
55552       new_path="$CYGWIN_ROOT_PATH$input_path"
55553     fi
55554   fi
55555 
55556 
55557   if test "x$path" != "x$new_path"; then
55558     MSVC_DLL="$new_path"
55559     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55560 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55561   fi
55562 
55563     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55564 
55565   path="$MSVC_DLL"
55566   has_colon=`$ECHO $path | $GREP ^.:`
55567   new_path="$path"
55568   if test "x$has_colon" = x; then
55569     # Not in mixed or Windows style, start by that.
55570     new_path=`cmd //c echo $path`
55571   fi
55572 
55573 
55574   input_path="$new_path"
55575   # Check if we need to convert this using DOS-style short mode. If the path
55576   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55577   # take no chances and rewrite it.
55578   # Note: m4 eats our [], so we need to use [ and ] instead.
55579   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55580   if test "x$has_forbidden_chars" != x; then
55581     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55582     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55583   fi
55584 
55585 
55586   windows_path="$new_path"
55587   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55588     unix_path=`$CYGPATH -u "$windows_path"`
55589     new_path="$unix_path"
55590   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55591     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55592     new_path="$unix_path"
55593   fi
55594 
55595   if test "x$path" != "x$new_path"; then
55596     MSVC_DLL="$new_path"
55597     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55598 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55599   fi
55600 
55601   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55602   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55603 
55604     else
55605       # We're on a unix platform. Hooray! :)
55606       path="$MSVC_DLL"
55607       has_space=`$ECHO "$path" | $GREP " "`
55608       if test "x$has_space" != x; then
55609         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55610 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55611         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55612       fi
55613 
55614       # Use eval to expand a potential ~
55615       eval path="$path"
55616       if test ! -f "$path" && test ! -d "$path"; then
55617         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55618       fi
55619 
55620       if test -d "$path"; then
55621         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55622       else
55623         dir="`$DIRNAME "$path"`"
55624         base="`$BASENAME "$path"`"
55625         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55626       fi
55627     fi
55628   fi
55629 
55630       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55631 $as_echo_n "checking for $DLL_NAME... " >&6; }
55632       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55633 $as_echo "$MSVC_DLL" >&6; }
55634     else
55635       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55636 $as_echo "incorrect, ignoring" >&6; }
55637       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55638 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55639     fi
55640   fi
55641 
55642   fi
55643 
55644   if test "x$MSVC_DLL" = x; then
55645     # Probe: Look in the Windows system32 directory
55646     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55647 
55648   windows_path="$CYGWIN_SYSTEMROOT"
55649   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55650     unix_path=`$CYGPATH -u "$windows_path"`
55651     CYGWIN_SYSTEMROOT="$unix_path"
55652   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55653     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55654     CYGWIN_SYSTEMROOT="$unix_path"
55655   fi
55656 
55657     POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55658 
55659   DLL_NAME="$DLL_NAME"
55660   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55661   METHOD="well-known location in SYSTEMROOT"
55662   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55663     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55664 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55665 
55666     # Need to check if the found msvcr is correct architecture
55667     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55668 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55669     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55670     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55671       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55672       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55673       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55674         CORRECT_MSVCR_ARCH="PE32 executable"
55675       else
55676         CORRECT_MSVCR_ARCH="PE32+ executable"
55677       fi
55678     else
55679       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55680         CORRECT_MSVCR_ARCH=386
55681       else
55682         CORRECT_MSVCR_ARCH=x86-64
55683       fi
55684     fi
55685     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55686       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55687 $as_echo "ok" >&6; }
55688       MSVC_DLL="$POSSIBLE_MSVC_DLL"
55689 
55690   # Only process if variable expands to non-empty
55691 
55692   if test "x$MSVC_DLL" != x; then
55693     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55694 
55695   # Input might be given as Windows format, start by converting to
55696   # unix format.
55697   path="$MSVC_DLL"
55698   new_path=`$CYGPATH -u "$path"`
55699 
55700   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55701   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55702   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55703   # "foo.exe" is OK but "foo" is an error.
55704   #
55705   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55706   # It is also a way to make sure we got the proper file name for the real test later on.
55707   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55708   if test "x$test_shortpath" = x; then
55709     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55710 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55711     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55712   fi
55713 
55714   # Call helper function which possibly converts this using DOS-style short mode.
55715   # If so, the updated path is stored in $new_path.
55716 
55717   input_path="$new_path"
55718   # Check if we need to convert this using DOS-style short mode. If the path
55719   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55720   # take no chances and rewrite it.
55721   # Note: m4 eats our [], so we need to use [ and ] instead.
55722   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55723   if test "x$has_forbidden_chars" != x; then
55724     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55725     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55726     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55727     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55728       # Going to short mode and back again did indeed matter. Since short mode is
55729       # case insensitive, let's make it lowercase to improve readability.
55730       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55731       # Now convert it back to Unix-style (cygpath)
55732       input_path=`$CYGPATH -u "$shortmode_path"`
55733       new_path="$input_path"
55734     fi
55735   fi
55736 
55737   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55738   if test "x$test_cygdrive_prefix" = x; then
55739     # As a simple fix, exclude /usr/bin since it's not a real path.
55740     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55741       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55742       # a path prefixed by /cygdrive for fixpath to work.
55743       new_path="$CYGWIN_ROOT_PATH$input_path"
55744     fi
55745   fi
55746 
55747 
55748   if test "x$path" != "x$new_path"; then
55749     MSVC_DLL="$new_path"
55750     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55751 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55752   fi
55753 
55754     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55755 
55756   path="$MSVC_DLL"
55757   has_colon=`$ECHO $path | $GREP ^.:`
55758   new_path="$path"
55759   if test "x$has_colon" = x; then
55760     # Not in mixed or Windows style, start by that.
55761     new_path=`cmd //c echo $path`
55762   fi
55763 
55764 
55765   input_path="$new_path"
55766   # Check if we need to convert this using DOS-style short mode. If the path
55767   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55768   # take no chances and rewrite it.
55769   # Note: m4 eats our [], so we need to use [ and ] instead.
55770   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55771   if test "x$has_forbidden_chars" != x; then
55772     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55773     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55774   fi
55775 
55776 
55777   windows_path="$new_path"
55778   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55779     unix_path=`$CYGPATH -u "$windows_path"`
55780     new_path="$unix_path"
55781   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55782     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55783     new_path="$unix_path"
55784   fi
55785 
55786   if test "x$path" != "x$new_path"; then
55787     MSVC_DLL="$new_path"
55788     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55789 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55790   fi
55791 
55792   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55793   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55794 
55795     else
55796       # We're on a unix platform. Hooray! :)
55797       path="$MSVC_DLL"
55798       has_space=`$ECHO "$path" | $GREP " "`
55799       if test "x$has_space" != x; then
55800         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55801 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55802         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55803       fi
55804 
55805       # Use eval to expand a potential ~
55806       eval path="$path"
55807       if test ! -f "$path" && test ! -d "$path"; then
55808         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55809       fi
55810 
55811       if test -d "$path"; then
55812         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55813       else
55814         dir="`$DIRNAME "$path"`"
55815         base="`$BASENAME "$path"`"
55816         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55817       fi
55818     fi
55819   fi
55820 
55821       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55822 $as_echo_n "checking for $DLL_NAME... " >&6; }
55823       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55824 $as_echo "$MSVC_DLL" >&6; }
55825     else
55826       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55827 $as_echo "incorrect, ignoring" >&6; }
55828       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55829 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55830     fi
55831   fi
55832 
55833   fi
55834 
55835   if test "x$MSVC_DLL" = x; then
55836     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55837     if test "x$VS100COMNTOOLS" != x; then
55838       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55839 
55840   windows_path="$CYGWIN_VS_TOOLS_DIR"
55841   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55842     unix_path=`$CYGPATH -u "$windows_path"`
55843     CYGWIN_VS_TOOLS_DIR="$unix_path"
55844   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55845     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55846     CYGWIN_VS_TOOLS_DIR="$unix_path"
55847   fi
55848 
55849       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55850         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55851             | $GREP -i /x64/ | $HEAD --lines 1`
55852       else
55853         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55854             | $GREP -i /x86/ | $HEAD --lines 1`
55855       fi
55856 
55857   DLL_NAME="$DLL_NAME"
55858   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55859   METHOD="search of VS100COMNTOOLS"
55860   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55861     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55862 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55863 
55864     # Need to check if the found msvcr is correct architecture
55865     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55866 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55867     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55868     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55869       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55870       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55871       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55872         CORRECT_MSVCR_ARCH="PE32 executable"
55873       else
55874         CORRECT_MSVCR_ARCH="PE32+ executable"
55875       fi
55876     else
55877       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55878         CORRECT_MSVCR_ARCH=386
55879       else
55880         CORRECT_MSVCR_ARCH=x86-64
55881       fi
55882     fi
55883     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55884       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55885 $as_echo "ok" >&6; }
55886       MSVC_DLL="$POSSIBLE_MSVC_DLL"
55887 
55888   # Only process if variable expands to non-empty
55889 
55890   if test "x$MSVC_DLL" != x; then
55891     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55892 
55893   # Input might be given as Windows format, start by converting to
55894   # unix format.
55895   path="$MSVC_DLL"
55896   new_path=`$CYGPATH -u "$path"`
55897 
55898   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55899   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55900   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55901   # "foo.exe" is OK but "foo" is an error.
55902   #
55903   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55904   # It is also a way to make sure we got the proper file name for the real test later on.
55905   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55906   if test "x$test_shortpath" = x; then
55907     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55908 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55909     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55910   fi
55911 
55912   # Call helper function which possibly converts this using DOS-style short mode.
55913   # If so, the updated path is stored in $new_path.
55914 
55915   input_path="$new_path"
55916   # Check if we need to convert this using DOS-style short mode. If the path
55917   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55918   # take no chances and rewrite it.
55919   # Note: m4 eats our [], so we need to use [ and ] instead.
55920   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55921   if test "x$has_forbidden_chars" != x; then
55922     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55923     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55924     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55925     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55926       # Going to short mode and back again did indeed matter. Since short mode is
55927       # case insensitive, let's make it lowercase to improve readability.
55928       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55929       # Now convert it back to Unix-style (cygpath)
55930       input_path=`$CYGPATH -u "$shortmode_path"`
55931       new_path="$input_path"
55932     fi
55933   fi
55934 
55935   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55936   if test "x$test_cygdrive_prefix" = x; then
55937     # As a simple fix, exclude /usr/bin since it's not a real path.
55938     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55939       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55940       # a path prefixed by /cygdrive for fixpath to work.
55941       new_path="$CYGWIN_ROOT_PATH$input_path"
55942     fi
55943   fi
55944 
55945 
55946   if test "x$path" != "x$new_path"; then
55947     MSVC_DLL="$new_path"
55948     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55949 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55950   fi
55951 
55952     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55953 
55954   path="$MSVC_DLL"
55955   has_colon=`$ECHO $path | $GREP ^.:`
55956   new_path="$path"
55957   if test "x$has_colon" = x; then
55958     # Not in mixed or Windows style, start by that.
55959     new_path=`cmd //c echo $path`
55960   fi
55961 
55962 
55963   input_path="$new_path"
55964   # Check if we need to convert this using DOS-style short mode. If the path
55965   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55966   # take no chances and rewrite it.
55967   # Note: m4 eats our [], so we need to use [ and ] instead.
55968   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55969   if test "x$has_forbidden_chars" != x; then
55970     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55971     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55972   fi
55973 
55974 
55975   windows_path="$new_path"
55976   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55977     unix_path=`$CYGPATH -u "$windows_path"`
55978     new_path="$unix_path"
55979   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55980     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55981     new_path="$unix_path"
55982   fi
55983 
55984   if test "x$path" != "x$new_path"; then
55985     MSVC_DLL="$new_path"
55986     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55987 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55988   fi
55989 
55990   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55991   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55992 
55993     else
55994       # We're on a unix platform. Hooray! :)
55995       path="$MSVC_DLL"
55996       has_space=`$ECHO "$path" | $GREP " "`
55997       if test "x$has_space" != x; then
55998         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55999 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56000         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56001       fi
56002 
56003       # Use eval to expand a potential ~
56004       eval path="$path"
56005       if test ! -f "$path" && test ! -d "$path"; then
56006         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56007       fi
56008 
56009       if test -d "$path"; then
56010         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56011       else
56012         dir="`$DIRNAME "$path"`"
56013         base="`$BASENAME "$path"`"
56014         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56015       fi
56016     fi
56017   fi
56018 
56019       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56020 $as_echo_n "checking for $DLL_NAME... " >&6; }
56021       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56022 $as_echo "$MSVC_DLL" >&6; }
56023     else
56024       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56025 $as_echo "incorrect, ignoring" >&6; }
56026       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56027 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56028     fi
56029   fi
56030 
56031     fi
56032   fi
56033 
56034   if test "x$MSVC_DLL" = x; then
56035     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
56036     # (This was the original behaviour; kept since it might turn something up)
56037     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
56038       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56039         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56040             | $GREP x64 | $HEAD --lines 1`
56041       else
56042         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56043             | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
56044         if test "x$POSSIBLE_MSVC_DLL" = x; then
56045           # We're grasping at straws now...
56046           POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56047               | $HEAD --lines 1`
56048         fi
56049       fi
56050 
56051 
56052   DLL_NAME="$DLL_NAME"
56053   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56054   METHOD="search of VCINSTALLDIR"
56055   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56056     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56057 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56058 
56059     # Need to check if the found msvcr is correct architecture
56060     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56061 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56062     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56063     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56064       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56065       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56066       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56067         CORRECT_MSVCR_ARCH="PE32 executable"
56068       else
56069         CORRECT_MSVCR_ARCH="PE32+ executable"
56070       fi
56071     else
56072       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56073         CORRECT_MSVCR_ARCH=386
56074       else
56075         CORRECT_MSVCR_ARCH=x86-64
56076       fi
56077     fi
56078     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56079       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56080 $as_echo "ok" >&6; }
56081       MSVC_DLL="$POSSIBLE_MSVC_DLL"
56082 
56083   # Only process if variable expands to non-empty
56084 
56085   if test "x$MSVC_DLL" != x; then
56086     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56087 
56088   # Input might be given as Windows format, start by converting to
56089   # unix format.
56090   path="$MSVC_DLL"
56091   new_path=`$CYGPATH -u "$path"`
56092 
56093   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56094   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56095   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56096   # "foo.exe" is OK but "foo" is an error.
56097   #
56098   # This test is therefore slightly more accurate than "test -f" to check for file precense.
56099   # It is also a way to make sure we got the proper file name for the real test later on.
56100   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56101   if test "x$test_shortpath" = x; then
56102     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56103 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56104     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56105   fi
56106 
56107   # Call helper function which possibly converts this using DOS-style short mode.
56108   # If so, the updated path is stored in $new_path.
56109 
56110   input_path="$new_path"
56111   # Check if we need to convert this using DOS-style short mode. If the path
56112   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56113   # take no chances and rewrite it.
56114   # Note: m4 eats our [], so we need to use [ and ] instead.
56115   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56116   if test "x$has_forbidden_chars" != x; then
56117     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56118     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56119     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56120     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56121       # Going to short mode and back again did indeed matter. Since short mode is
56122       # case insensitive, let's make it lowercase to improve readability.
56123       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56124       # Now convert it back to Unix-style (cygpath)
56125       input_path=`$CYGPATH -u "$shortmode_path"`
56126       new_path="$input_path"
56127     fi
56128   fi
56129 
56130   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56131   if test "x$test_cygdrive_prefix" = x; then
56132     # As a simple fix, exclude /usr/bin since it's not a real path.
56133     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56134       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56135       # a path prefixed by /cygdrive for fixpath to work.
56136       new_path="$CYGWIN_ROOT_PATH$input_path"
56137     fi
56138   fi
56139 
56140 
56141   if test "x$path" != "x$new_path"; then
56142     MSVC_DLL="$new_path"
56143     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56144 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56145   fi
56146 
56147     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56148 
56149   path="$MSVC_DLL"
56150   has_colon=`$ECHO $path | $GREP ^.:`
56151   new_path="$path"
56152   if test "x$has_colon" = x; then
56153     # Not in mixed or Windows style, start by that.
56154     new_path=`cmd //c echo $path`
56155   fi
56156 
56157 
56158   input_path="$new_path"
56159   # Check if we need to convert this using DOS-style short mode. If the path
56160   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56161   # take no chances and rewrite it.
56162   # Note: m4 eats our [], so we need to use [ and ] instead.
56163   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56164   if test "x$has_forbidden_chars" != x; then
56165     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56166     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56167   fi
56168 
56169 
56170   windows_path="$new_path"
56171   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56172     unix_path=`$CYGPATH -u "$windows_path"`
56173     new_path="$unix_path"
56174   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56175     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56176     new_path="$unix_path"
56177   fi
56178 
56179   if test "x$path" != "x$new_path"; then
56180     MSVC_DLL="$new_path"
56181     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56182 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56183   fi
56184 
56185   # Save the first 10 bytes of this path to the storage, so fixpath can work.
56186   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56187 
56188     else
56189       # We're on a unix platform. Hooray! :)
56190       path="$MSVC_DLL"
56191       has_space=`$ECHO "$path" | $GREP " "`
56192       if test "x$has_space" != x; then
56193         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56194 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56195         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56196       fi
56197 
56198       # Use eval to expand a potential ~
56199       eval path="$path"
56200       if test ! -f "$path" && test ! -d "$path"; then
56201         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56202       fi
56203 
56204       if test -d "$path"; then
56205         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56206       else
56207         dir="`$DIRNAME "$path"`"
56208         base="`$BASENAME "$path"`"
56209         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56210       fi
56211     fi
56212   fi
56213 
56214       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56215 $as_echo_n "checking for $DLL_NAME... " >&6; }
56216       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56217 $as_echo "$MSVC_DLL" >&6; }
56218     else
56219       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56220 $as_echo "incorrect, ignoring" >&6; }
56221       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56222 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56223     fi
56224   fi
56225 
56226     fi
56227   fi
56228 
56229   if test "x$MSVC_DLL" = x; then
56230     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56231 $as_echo_n "checking for $DLL_NAME... " >&6; }
56232     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56233 $as_echo "no" >&6; }
56234     as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
56235   fi
56236 
56237       MSVCP_DLL="$MSVC_DLL"
56238     fi
56239 
56240   fi
56241 
56242   fi
56243 
56244 
56245   if test "x$NEEDS_LIB_X11" = xfalse; then
56246     if (test "x${with_x}" != x && test "x${with_x}" != xno); then
56247       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
56248 $as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
56249     fi
56250     X_CFLAGS=
56251     X_LIBS=
56252   else
56253 
56254     if test "x${with_x}" = xno; then
56255       as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
56256     fi
56257 
56258     if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
56259       # The user has specified a X11 base directory. Use it for includes and
56260       # libraries, unless explicitly overridden.
56261       if test "x$x_includes" = xNONE; then
56262         x_includes="${with_x}/include"
56263       fi
56264       if test "x$x_libraries" = xNONE; then
56265         x_libraries="${with_x}/lib"
56266       fi
56267     else
56268       # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
56269       # Make a simple check for the libraries at the sysroot, and setup --x-includes and
56270       # --x-libraries for the sysroot, if that seems to be correct.
56271       if test "x$SYSROOT" != "x"; then
56272         if test "x$x_includes" = xNONE; then
56273           if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
56274             x_includes="$SYSROOT/usr/X11R6/include"
56275           elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
56276             x_includes="$SYSROOT/usr/include"
56277           fi
56278         fi
56279         if test "x$x_libraries" = xNONE; then
56280           if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
56281             x_libraries="$SYSROOT/usr/X11R6/lib"
56282           elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56283             x_libraries="$SYSROOT/usr/lib64"
56284           elif test -f "$SYSROOT/usr/lib/libX11.so"; then
56285             x_libraries="$SYSROOT/usr/lib"
56286           fi
56287         fi
56288       fi
56289     fi
56290 
56291     # Now let autoconf do it's magic
56292     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
56293 $as_echo_n "checking for X... " >&6; }
56294 
56295 
56296 # Check whether --with-x was given.
56297 if test "${with_x+set}" = set; then :
56298   withval=$with_x;
56299 fi
56300 
56301 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
56302 if test "x$with_x" = xno; then
56303   # The user explicitly disabled X.
56304   have_x=disabled
56305 else
56306   case $x_includes,$x_libraries in #(
56307     *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
56308     *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
56309   $as_echo_n "(cached) " >&6
56310 else
56311   # One or both of the vars are not set, and there is no cached value.
56312 ac_x_includes=no ac_x_libraries=no
56313 rm -f -r conftest.dir
56314 if mkdir conftest.dir; then
56315   cd conftest.dir
56316   cat >Imakefile <<'_ACEOF'
56317 incroot:
56318         @echo incroot='${INCROOT}'
56319 usrlibdir:
56320         @echo usrlibdir='${USRLIBDIR}'
56321 libdir:
56322         @echo libdir='${LIBDIR}'
56323 _ACEOF
56324   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
56325     # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
56326     for ac_var in incroot usrlibdir libdir; do
56327       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
56328     done
56329     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
56330     for ac_extension in a so sl dylib la dll; do
56331       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
56332          test -f "$ac_im_libdir/libX11.$ac_extension"; then
56333         ac_im_usrlibdir=$ac_im_libdir; break
56334       fi
56335     done
56336     # Screen out bogus values from the imake configuration.  They are
56337     # bogus both because they are the default anyway, and because
56338     # using them would break gcc on systems where it needs fixed includes.
56339     case $ac_im_incroot in
56340         /usr/include) ac_x_includes= ;;
56341         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
56342     esac
56343     case $ac_im_usrlibdir in
56344         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
56345         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
56346     esac
56347   fi
56348   cd ..
56349   rm -f -r conftest.dir
56350 fi
56351 
56352 # Standard set of common directories for X headers.
56353 # Check X11 before X11Rn because it is often a symlink to the current release.
56354 ac_x_header_dirs='
56355 /usr/X11/include
56356 /usr/X11R7/include
56357 /usr/X11R6/include
56358 /usr/X11R5/include
56359 /usr/X11R4/include
56360 
56361 /usr/include/X11
56362 /usr/include/X11R7
56363 /usr/include/X11R6
56364 /usr/include/X11R5
56365 /usr/include/X11R4
56366 
56367 /usr/local/X11/include
56368 /usr/local/X11R7/include
56369 /usr/local/X11R6/include
56370 /usr/local/X11R5/include
56371 /usr/local/X11R4/include
56372 
56373 /usr/local/include/X11
56374 /usr/local/include/X11R7
56375 /usr/local/include/X11R6
56376 /usr/local/include/X11R5
56377 /usr/local/include/X11R4
56378 
56379 /usr/X386/include
56380 /usr/x386/include
56381 /usr/XFree86/include/X11
56382 
56383 /usr/include
56384 /usr/local/include
56385 /usr/unsupported/include
56386 /usr/athena/include
56387 /usr/local/x11r5/include
56388 /usr/lpp/Xamples/include
56389 
56390 /usr/openwin/include
56391 /usr/openwin/share/include'
56392 
56393 if test "$ac_x_includes" = no; then
56394   # Guess where to find include files, by looking for Xlib.h.
56395   # First, try using that file with no special directory specified.
56396   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56397 /* end confdefs.h.  */
56398 #include <X11/Xlib.h>
56399 _ACEOF
56400 if ac_fn_cxx_try_cpp "$LINENO"; then :
56401   # We can compile using X headers with no special include directory.
56402 ac_x_includes=
56403 else
56404   for ac_dir in $ac_x_header_dirs; do
56405   if test -r "$ac_dir/X11/Xlib.h"; then
56406     ac_x_includes=$ac_dir
56407     break
56408   fi
56409 done
56410 fi
56411 rm -f conftest.err conftest.i conftest.$ac_ext
56412 fi # $ac_x_includes = no
56413 
56414 if test "$ac_x_libraries" = no; then
56415   # Check for the libraries.
56416   # See if we find them without any special options.
56417   # Don't add to $LIBS permanently.
56418   ac_save_LIBS=$LIBS
56419   LIBS="-lX11 $LIBS"
56420   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56421 /* end confdefs.h.  */
56422 #include <X11/Xlib.h>
56423 int
56424 main ()
56425 {
56426 XrmInitialize ()
56427   ;
56428   return 0;
56429 }
56430 _ACEOF
56431 if ac_fn_cxx_try_link "$LINENO"; then :
56432   LIBS=$ac_save_LIBS
56433 # We can link X programs with no special library path.
56434 ac_x_libraries=
56435 else
56436   LIBS=$ac_save_LIBS
56437 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
56438 do
56439   # Don't even attempt the hair of trying to link an X program!
56440   for ac_extension in a so sl dylib la dll; do
56441     if test -r "$ac_dir/libX11.$ac_extension"; then
56442       ac_x_libraries=$ac_dir
56443       break 2
56444     fi
56445   done
56446 done
56447 fi
56448 rm -f core conftest.err conftest.$ac_objext \
56449     conftest$ac_exeext conftest.$ac_ext
56450 fi # $ac_x_libraries = no
56451 
56452 case $ac_x_includes,$ac_x_libraries in #(
56453   no,* | *,no | *\'*)
56454     # Didn't find X, or a directory has "'" in its name.
56455     ac_cv_have_x="have_x=no";; #(
56456   *)
56457     # Record where we found X for the cache.
56458     ac_cv_have_x="have_x=yes\
56459         ac_x_includes='$ac_x_includes'\
56460         ac_x_libraries='$ac_x_libraries'"
56461 esac
56462 fi
56463 ;; #(
56464     *) have_x=yes;;
56465   esac
56466   eval "$ac_cv_have_x"
56467 fi # $with_x != no
56468 
56469 if test "$have_x" != yes; then
56470   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
56471 $as_echo "$have_x" >&6; }
56472   no_x=yes
56473 else
56474   # If each of the values was on the command line, it overrides each guess.
56475   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
56476   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
56477   # Update the cache value to reflect the command line values.
56478   ac_cv_have_x="have_x=yes\
56479         ac_x_includes='$x_includes'\
56480         ac_x_libraries='$x_libraries'"
56481   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
56482 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
56483 fi
56484 
56485     if test "$no_x" = yes; then
56486   # Not all programs may use this symbol, but it does not hurt to define it.
56487 
56488 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
56489 
56490   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
56491 else
56492   if test -n "$x_includes"; then
56493     X_CFLAGS="$X_CFLAGS -I$x_includes"
56494   fi
56495 
56496   # It would also be nice to do this for all -L options, not just this one.
56497   if test -n "$x_libraries"; then
56498     X_LIBS="$X_LIBS -L$x_libraries"
56499     # For Solaris; some versions of Sun CC require a space after -R and
56500     # others require no space.  Words are not sufficient . . . .
56501     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
56502 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
56503     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
56504     ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
56505     ac_cxx_werror_flag=yes
56506     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56507 /* end confdefs.h.  */
56508 
56509 int
56510 main ()
56511 {
56512 
56513   ;
56514   return 0;
56515 }
56516 _ACEOF
56517 if ac_fn_cxx_try_link "$LINENO"; then :
56518   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56519 $as_echo "no" >&6; }
56520        X_LIBS="$X_LIBS -R$x_libraries"
56521 else
56522   LIBS="$ac_xsave_LIBS -R $x_libraries"
56523        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56524 /* end confdefs.h.  */
56525 
56526 int
56527 main ()
56528 {
56529 
56530   ;
56531   return 0;
56532 }
56533 _ACEOF
56534 if ac_fn_cxx_try_link "$LINENO"; then :
56535   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56536 $as_echo "yes" >&6; }
56537           X_LIBS="$X_LIBS -R $x_libraries"
56538 else
56539   { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
56540 $as_echo "neither works" >&6; }
56541 fi
56542 rm -f core conftest.err conftest.$ac_objext \
56543     conftest$ac_exeext conftest.$ac_ext
56544 fi
56545 rm -f core conftest.err conftest.$ac_objext \
56546     conftest$ac_exeext conftest.$ac_ext
56547     ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
56548     LIBS=$ac_xsave_LIBS
56549   fi
56550 
56551   # Check for system-dependent libraries X programs must link with.
56552   # Do this before checking for the system-independent R6 libraries
56553   # (-lICE), since we may need -lsocket or whatever for X linking.
56554 
56555   if test "$ISC" = yes; then
56556     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
56557   else
56558     # Martyn Johnson says this is needed for Ultrix, if the X
56559     # libraries were built with DECnet support.  And Karl Berry says
56560     # the Alpha needs dnet_stub (dnet does not exist).
56561     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
56562     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56563 /* end confdefs.h.  */
56564 
56565 /* Override any GCC internal prototype to avoid an error.
56566    Use char because int might match the return type of a GCC
56567    builtin and then its argument prototype would still apply.  */
56568 #ifdef __cplusplus
56569 extern "C"
56570 #endif
56571 char XOpenDisplay ();
56572 int
56573 main ()
56574 {
56575 return XOpenDisplay ();
56576   ;
56577   return 0;
56578 }
56579 _ACEOF
56580 if ac_fn_cxx_try_link "$LINENO"; then :
56581 
56582 else
56583   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
56584 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
56585 if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
56586   $as_echo_n "(cached) " >&6
56587 else
56588   ac_check_lib_save_LIBS=$LIBS
56589 LIBS="-ldnet  $LIBS"
56590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56591 /* end confdefs.h.  */
56592 
56593 /* Override any GCC internal prototype to avoid an error.
56594    Use char because int might match the return type of a GCC
56595    builtin and then its argument prototype would still apply.  */
56596 #ifdef __cplusplus
56597 extern "C"
56598 #endif
56599 char dnet_ntoa ();
56600 int
56601 main ()
56602 {
56603 return dnet_ntoa ();
56604   ;
56605   return 0;
56606 }
56607 _ACEOF
56608 if ac_fn_cxx_try_link "$LINENO"; then :
56609   ac_cv_lib_dnet_dnet_ntoa=yes
56610 else
56611   ac_cv_lib_dnet_dnet_ntoa=no
56612 fi
56613 rm -f core conftest.err conftest.$ac_objext \
56614     conftest$ac_exeext conftest.$ac_ext
56615 LIBS=$ac_check_lib_save_LIBS
56616 fi
56617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
56618 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
56619 if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
56620   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
56621 fi
56622 
56623     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
56624       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
56625 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
56626 if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
56627   $as_echo_n "(cached) " >&6
56628 else
56629   ac_check_lib_save_LIBS=$LIBS
56630 LIBS="-ldnet_stub  $LIBS"
56631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56632 /* end confdefs.h.  */
56633 
56634 /* Override any GCC internal prototype to avoid an error.
56635    Use char because int might match the return type of a GCC
56636    builtin and then its argument prototype would still apply.  */
56637 #ifdef __cplusplus
56638 extern "C"
56639 #endif
56640 char dnet_ntoa ();
56641 int
56642 main ()
56643 {
56644 return dnet_ntoa ();
56645   ;
56646   return 0;
56647 }
56648 _ACEOF
56649 if ac_fn_cxx_try_link "$LINENO"; then :
56650   ac_cv_lib_dnet_stub_dnet_ntoa=yes
56651 else
56652   ac_cv_lib_dnet_stub_dnet_ntoa=no
56653 fi
56654 rm -f core conftest.err conftest.$ac_objext \
56655     conftest$ac_exeext conftest.$ac_ext
56656 LIBS=$ac_check_lib_save_LIBS
56657 fi
56658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
56659 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
56660 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
56661   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
56662 fi
56663 
56664     fi
56665 fi
56666 rm -f core conftest.err conftest.$ac_objext \
56667     conftest$ac_exeext conftest.$ac_ext
56668     LIBS="$ac_xsave_LIBS"
56669 
56670     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
56671     # to get the SysV transport functions.
56672     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
56673     # needs -lnsl.
56674     # The nsl library prevents programs from opening the X display
56675     # on Irix 5.2, according to T.E. Dickey.
56676     # The functions gethostbyname, getservbyname, and inet_addr are
56677     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
56678     ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
56679 if test "x$ac_cv_func_gethostbyname" = xyes; then :
56680 
56681 fi
56682 
56683     if test $ac_cv_func_gethostbyname = no; then
56684       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
56685 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
56686 if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
56687   $as_echo_n "(cached) " >&6
56688 else
56689   ac_check_lib_save_LIBS=$LIBS
56690 LIBS="-lnsl  $LIBS"
56691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56692 /* end confdefs.h.  */
56693 
56694 /* Override any GCC internal prototype to avoid an error.
56695    Use char because int might match the return type of a GCC
56696    builtin and then its argument prototype would still apply.  */
56697 #ifdef __cplusplus
56698 extern "C"
56699 #endif
56700 char gethostbyname ();
56701 int
56702 main ()
56703 {
56704 return gethostbyname ();
56705   ;
56706   return 0;
56707 }
56708 _ACEOF
56709 if ac_fn_cxx_try_link "$LINENO"; then :
56710   ac_cv_lib_nsl_gethostbyname=yes
56711 else
56712   ac_cv_lib_nsl_gethostbyname=no
56713 fi
56714 rm -f core conftest.err conftest.$ac_objext \
56715     conftest$ac_exeext conftest.$ac_ext
56716 LIBS=$ac_check_lib_save_LIBS
56717 fi
56718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
56719 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
56720 if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
56721   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
56722 fi
56723 
56724       if test $ac_cv_lib_nsl_gethostbyname = no; then
56725         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
56726 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
56727 if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
56728   $as_echo_n "(cached) " >&6
56729 else
56730   ac_check_lib_save_LIBS=$LIBS
56731 LIBS="-lbsd  $LIBS"
56732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56733 /* end confdefs.h.  */
56734 
56735 /* Override any GCC internal prototype to avoid an error.
56736    Use char because int might match the return type of a GCC
56737    builtin and then its argument prototype would still apply.  */
56738 #ifdef __cplusplus
56739 extern "C"
56740 #endif
56741 char gethostbyname ();
56742 int
56743 main ()
56744 {
56745 return gethostbyname ();
56746   ;
56747   return 0;
56748 }
56749 _ACEOF
56750 if ac_fn_cxx_try_link "$LINENO"; then :
56751   ac_cv_lib_bsd_gethostbyname=yes
56752 else
56753   ac_cv_lib_bsd_gethostbyname=no
56754 fi
56755 rm -f core conftest.err conftest.$ac_objext \
56756     conftest$ac_exeext conftest.$ac_ext
56757 LIBS=$ac_check_lib_save_LIBS
56758 fi
56759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
56760 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
56761 if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
56762   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
56763 fi
56764 
56765       fi
56766     fi
56767 
56768     # lieder@skyler.mavd.honeywell.com says without -lsocket,
56769     # socket/setsockopt and other routines are undefined under SCO ODT
56770     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
56771     # on later versions), says Simon Leinen: it contains gethostby*
56772     # variants that don't use the name server (or something).  -lsocket
56773     # must be given before -lnsl if both are needed.  We assume that
56774     # if connect needs -lnsl, so does gethostbyname.
56775     ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
56776 if test "x$ac_cv_func_connect" = xyes; then :
56777 
56778 fi
56779 
56780     if test $ac_cv_func_connect = no; then
56781       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
56782 $as_echo_n "checking for connect in -lsocket... " >&6; }
56783 if ${ac_cv_lib_socket_connect+:} false; then :
56784   $as_echo_n "(cached) " >&6
56785 else
56786   ac_check_lib_save_LIBS=$LIBS
56787 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
56788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56789 /* end confdefs.h.  */
56790 
56791 /* Override any GCC internal prototype to avoid an error.
56792    Use char because int might match the return type of a GCC
56793    builtin and then its argument prototype would still apply.  */
56794 #ifdef __cplusplus
56795 extern "C"
56796 #endif
56797 char connect ();
56798 int
56799 main ()
56800 {
56801 return connect ();
56802   ;
56803   return 0;
56804 }
56805 _ACEOF
56806 if ac_fn_cxx_try_link "$LINENO"; then :
56807   ac_cv_lib_socket_connect=yes
56808 else
56809   ac_cv_lib_socket_connect=no
56810 fi
56811 rm -f core conftest.err conftest.$ac_objext \
56812     conftest$ac_exeext conftest.$ac_ext
56813 LIBS=$ac_check_lib_save_LIBS
56814 fi
56815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
56816 $as_echo "$ac_cv_lib_socket_connect" >&6; }
56817 if test "x$ac_cv_lib_socket_connect" = xyes; then :
56818   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
56819 fi
56820 
56821     fi
56822 
56823     # Guillermo Gomez says -lposix is necessary on A/UX.
56824     ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
56825 if test "x$ac_cv_func_remove" = xyes; then :
56826 
56827 fi
56828 
56829     if test $ac_cv_func_remove = no; then
56830       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
56831 $as_echo_n "checking for remove in -lposix... " >&6; }
56832 if ${ac_cv_lib_posix_remove+:} false; then :
56833   $as_echo_n "(cached) " >&6
56834 else
56835   ac_check_lib_save_LIBS=$LIBS
56836 LIBS="-lposix  $LIBS"
56837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56838 /* end confdefs.h.  */
56839 
56840 /* Override any GCC internal prototype to avoid an error.
56841    Use char because int might match the return type of a GCC
56842    builtin and then its argument prototype would still apply.  */
56843 #ifdef __cplusplus
56844 extern "C"
56845 #endif
56846 char remove ();
56847 int
56848 main ()
56849 {
56850 return remove ();
56851   ;
56852   return 0;
56853 }
56854 _ACEOF
56855 if ac_fn_cxx_try_link "$LINENO"; then :
56856   ac_cv_lib_posix_remove=yes
56857 else
56858   ac_cv_lib_posix_remove=no
56859 fi
56860 rm -f core conftest.err conftest.$ac_objext \
56861     conftest$ac_exeext conftest.$ac_ext
56862 LIBS=$ac_check_lib_save_LIBS
56863 fi
56864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
56865 $as_echo "$ac_cv_lib_posix_remove" >&6; }
56866 if test "x$ac_cv_lib_posix_remove" = xyes; then :
56867   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
56868 fi
56869 
56870     fi
56871 
56872     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
56873     ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
56874 if test "x$ac_cv_func_shmat" = xyes; then :
56875 
56876 fi
56877 
56878     if test $ac_cv_func_shmat = no; then
56879       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
56880 $as_echo_n "checking for shmat in -lipc... " >&6; }
56881 if ${ac_cv_lib_ipc_shmat+:} false; then :
56882   $as_echo_n "(cached) " >&6
56883 else
56884   ac_check_lib_save_LIBS=$LIBS
56885 LIBS="-lipc  $LIBS"
56886 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56887 /* end confdefs.h.  */
56888 
56889 /* Override any GCC internal prototype to avoid an error.
56890    Use char because int might match the return type of a GCC
56891    builtin and then its argument prototype would still apply.  */
56892 #ifdef __cplusplus
56893 extern "C"
56894 #endif
56895 char shmat ();
56896 int
56897 main ()
56898 {
56899 return shmat ();
56900   ;
56901   return 0;
56902 }
56903 _ACEOF
56904 if ac_fn_cxx_try_link "$LINENO"; then :
56905   ac_cv_lib_ipc_shmat=yes
56906 else
56907   ac_cv_lib_ipc_shmat=no
56908 fi
56909 rm -f core conftest.err conftest.$ac_objext \
56910     conftest$ac_exeext conftest.$ac_ext
56911 LIBS=$ac_check_lib_save_LIBS
56912 fi
56913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
56914 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
56915 if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
56916   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
56917 fi
56918 
56919     fi
56920   fi
56921 
56922   # Check for libraries that X11R6 Xt/Xaw programs need.
56923   ac_save_LDFLAGS=$LDFLAGS
56924   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
56925   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
56926   # check for ICE first), but we must link in the order -lSM -lICE or
56927   # we get undefined symbols.  So assume we have SM if we have ICE.
56928   # These have to be linked with before -lX11, unlike the other
56929   # libraries we check for below, so use a different variable.
56930   # John Interrante, Karl Berry
56931   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
56932 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
56933 if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
56934   $as_echo_n "(cached) " >&6
56935 else
56936   ac_check_lib_save_LIBS=$LIBS
56937 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
56938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56939 /* end confdefs.h.  */
56940 
56941 /* Override any GCC internal prototype to avoid an error.
56942    Use char because int might match the return type of a GCC
56943    builtin and then its argument prototype would still apply.  */
56944 #ifdef __cplusplus
56945 extern "C"
56946 #endif
56947 char IceConnectionNumber ();
56948 int
56949 main ()
56950 {
56951 return IceConnectionNumber ();
56952   ;
56953   return 0;
56954 }
56955 _ACEOF
56956 if ac_fn_cxx_try_link "$LINENO"; then :
56957   ac_cv_lib_ICE_IceConnectionNumber=yes
56958 else
56959   ac_cv_lib_ICE_IceConnectionNumber=no
56960 fi
56961 rm -f core conftest.err conftest.$ac_objext \
56962     conftest$ac_exeext conftest.$ac_ext
56963 LIBS=$ac_check_lib_save_LIBS
56964 fi
56965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
56966 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
56967 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
56968   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
56969 fi
56970 
56971   LDFLAGS=$ac_save_LDFLAGS
56972 
56973 fi
56974 
56975 
56976     # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
56977     # this doesn't make sense so we remove it.
56978     if test "x$COMPILE_TYPE" = xcross; then
56979       X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
56980     fi
56981 
56982     if test "x$no_x" = xyes; then
56983 
56984   # Print a helpful message on how to acquire the necessary build dependency.
56985   # x11 is the help tag: freetype, cups, alsa etc
56986   MISSING_DEPENDENCY=x11
56987 
56988   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56989     cygwin_help $MISSING_DEPENDENCY
56990   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56991     msys_help $MISSING_DEPENDENCY
56992   else
56993     PKGHANDLER_COMMAND=
56994 
56995     case $PKGHANDLER in
56996       apt-get)
56997         apt_help     $MISSING_DEPENDENCY ;;
56998       yum)
56999         yum_help     $MISSING_DEPENDENCY ;;
57000       brew)
57001         brew_help    $MISSING_DEPENDENCY ;;
57002       port)
57003         port_help    $MISSING_DEPENDENCY ;;
57004       pkgutil)
57005         pkgutil_help $MISSING_DEPENDENCY ;;
57006       pkgadd)
57007         pkgadd_help  $MISSING_DEPENDENCY ;;
57008     esac
57009 
57010     if test "x$PKGHANDLER_COMMAND" != x; then
57011       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57012     fi
57013   fi
57014 
57015       as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
57016     fi
57017 
57018     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
57019       OPENWIN_HOME="/usr/openwin"
57020       X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
57021       X_LIBS="-L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
57022           -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
57023     fi
57024 
57025     ac_ext=c
57026 ac_cpp='$CPP $CPPFLAGS'
57027 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57028 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57029 ac_compiler_gnu=$ac_cv_c_compiler_gnu
57030 
57031     OLD_CFLAGS="$CFLAGS"
57032     CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
57033 
57034     # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
57035     for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
57036 do :
57037   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
57038 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
57039           # include <X11/Xlib.h>
57040           # include <X11/Xutil.h>
57041 
57042 
57043 "
57044 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
57045   cat >>confdefs.h <<_ACEOF
57046 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
57047 _ACEOF
57048  X11_HEADERS_OK=yes
57049 else
57050   X11_HEADERS_OK=no; break
57051 fi
57052 
57053 done
57054 
57055 
57056     if test "x$X11_HEADERS_OK" = xno; then
57057 
57058   # Print a helpful message on how to acquire the necessary build dependency.
57059   # x11 is the help tag: freetype, cups, alsa etc
57060   MISSING_DEPENDENCY=x11
57061 
57062   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57063     cygwin_help $MISSING_DEPENDENCY
57064   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57065     msys_help $MISSING_DEPENDENCY
57066   else
57067     PKGHANDLER_COMMAND=
57068 
57069     case $PKGHANDLER in
57070       apt-get)
57071         apt_help     $MISSING_DEPENDENCY ;;
57072       yum)
57073         yum_help     $MISSING_DEPENDENCY ;;
57074       brew)
57075         brew_help    $MISSING_DEPENDENCY ;;
57076       port)
57077         port_help    $MISSING_DEPENDENCY ;;
57078       pkgutil)
57079         pkgutil_help $MISSING_DEPENDENCY ;;
57080       pkgadd)
57081         pkgadd_help  $MISSING_DEPENDENCY ;;
57082     esac
57083 
57084     if test "x$PKGHANDLER_COMMAND" != x; then
57085       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57086     fi
57087   fi
57088 
57089       as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
57090     fi
57091 
57092     # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
57093     # defined in libawt_xawt.
57094     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
57095 $as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
57096     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57097 /* end confdefs.h.  */
57098 #include <X11/extensions/Xrender.h>
57099 int
57100 main ()
57101 {
57102 XLinearGradient x;
57103   ;
57104   return 0;
57105 }
57106 _ACEOF
57107 if ac_fn_c_try_compile "$LINENO"; then :
57108   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57109 $as_echo "yes" >&6; }
57110 else
57111   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57112 $as_echo "no" >&6; }
57113          X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
57114 fi
57115 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
57116 
57117     CFLAGS="$OLD_CFLAGS"
57118     ac_ext=cpp
57119 ac_cpp='$CXXCPP $CPPFLAGS'
57120 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57121 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57122 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
57123 
57124   fi # NEEDS_LIB_X11
57125 
57126 
57127 
57128 
57129 
57130 
57131 # Check whether --with-cups was given.
57132 if test "${with_cups+set}" = set; then :
57133   withval=$with_cups;
57134 fi
57135 
57136 
57137 # Check whether --with-cups-include was given.
57138 if test "${with_cups_include+set}" = set; then :
57139   withval=$with_cups_include;
57140 fi
57141 
57142 
57143   if test "x$NEEDS_LIB_CUPS" = xfalse; then
57144     if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
57145         (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
57146       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
57147 $as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
57148     fi
57149     CUPS_CFLAGS=
57150   else
57151     CUPS_FOUND=no
57152 
57153     if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
57154       as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
57155     fi
57156 
57157     if test "x${with_cups}" != x; then
57158       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
57159 $as_echo_n "checking for cups headers... " >&6; }
57160       if test -s "${with_cups}/include/cups/cups.h"; then
57161         CUPS_CFLAGS="-I${with_cups}/include"
57162         CUPS_FOUND=yes
57163         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
57164 $as_echo "$CUPS_FOUND" >&6; }
57165       else
57166         as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
57167       fi
57168     fi
57169     if test "x${with_cups_include}" != x; then
57170       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
57171 $as_echo_n "checking for cups headers... " >&6; }
57172       if test -s "${with_cups_include}/cups/cups.h"; then
57173         CUPS_CFLAGS="-I${with_cups_include}"
57174         CUPS_FOUND=yes
57175         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
57176 $as_echo "$CUPS_FOUND" >&6; }
57177       else
57178         as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
57179       fi
57180     fi
57181     if test "x$CUPS_FOUND" = xno; then
57182       # Are the cups headers installed in the default /usr/include location?
57183       for ac_header in cups/cups.h cups/ppd.h
57184 do :
57185   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
57186 ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
57187 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
57188   cat >>confdefs.h <<_ACEOF
57189 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
57190 _ACEOF
57191 
57192           CUPS_FOUND=yes
57193           CUPS_CFLAGS=
57194           DEFAULT_CUPS=yes
57195 
57196 fi
57197 
57198 done
57199 
57200     fi
57201     if test "x$CUPS_FOUND" = xno; then
57202 
57203   # Print a helpful message on how to acquire the necessary build dependency.
57204   # cups is the help tag: freetype, cups, alsa etc
57205   MISSING_DEPENDENCY=cups
57206 
57207   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57208     cygwin_help $MISSING_DEPENDENCY
57209   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57210     msys_help $MISSING_DEPENDENCY
57211   else
57212     PKGHANDLER_COMMAND=
57213 
57214     case $PKGHANDLER in
57215       apt-get)
57216         apt_help     $MISSING_DEPENDENCY ;;
57217       yum)
57218         yum_help     $MISSING_DEPENDENCY ;;
57219       brew)
57220         brew_help    $MISSING_DEPENDENCY ;;
57221       port)
57222         port_help    $MISSING_DEPENDENCY ;;
57223       pkgutil)
57224         pkgutil_help $MISSING_DEPENDENCY ;;
57225       pkgadd)
57226         pkgadd_help  $MISSING_DEPENDENCY ;;
57227     esac
57228 
57229     if test "x$PKGHANDLER_COMMAND" != x; then
57230       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57231     fi
57232   fi
57233 
57234       as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
57235     fi
57236   fi
57237 
57238 
57239 
57240 
57241 
57242 # Check whether --with-freetype was given.
57243 if test "${with_freetype+set}" = set; then :
57244   withval=$with_freetype;
57245 fi
57246 
57247 
57248 # Check whether --with-freetype-include was given.
57249 if test "${with_freetype_include+set}" = set; then :
57250   withval=$with_freetype_include;
57251 fi
57252 
57253 
57254 # Check whether --with-freetype-lib was given.
57255 if test "${with_freetype_lib+set}" = set; then :
57256   withval=$with_freetype_lib;
57257 fi
57258 
57259 
57260 # Check whether --with-freetype-src was given.
57261 if test "${with_freetype_src+set}" = set; then :
57262   withval=$with_freetype_src;
57263 fi
57264 
57265   # Check whether --enable-freetype-bundling was given.
57266 if test "${enable_freetype_bundling+set}" = set; then :
57267   enableval=$enable_freetype_bundling;
57268 fi
57269 
57270 
57271   # Need to specify explicitly since it needs to be overridden on some versions of macosx
57272   FREETYPE_BASE_NAME=freetype
57273   FREETYPE_CFLAGS=
57274   FREETYPE_LIBS=
57275   FREETYPE_BUNDLE_LIB_PATH=
57276 
57277   if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
57278     if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
57279         (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
57280         (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
57281         (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
57282       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
57283 $as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
57284     fi
57285     if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
57286       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
57287 $as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
57288     fi
57289   else
57290     # freetype is needed to build; go get it!
57291 
57292     BUNDLE_FREETYPE="$enable_freetype_bundling"
57293 
57294     if  test "x$with_freetype_src" != x; then
57295       if test "x$OPENJDK_TARGET_OS" = xwindows; then
57296         # Try to build freetype if --with-freetype-src was given on Windows
57297 
57298   FREETYPE_SRC_PATH="$with_freetype_src"
57299   BUILD_FREETYPE=yes
57300 
57301   # Check if the freetype sources are acessible..
57302   if ! test -d $FREETYPE_SRC_PATH; then
57303     { $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
57304 $as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
57305     BUILD_FREETYPE=no
57306   fi
57307   # ..and contain a vc2010 project file
57308   vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
57309   if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
57310     { $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
57311 $as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
57312     BUILD_FREETYPE=no
57313   fi
57314   # Now check if configure found a version of 'msbuild.exe'
57315   if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
57316     { $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
57317 $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;}
57318     BUILD_FREETYPE=no
57319   fi
57320 
57321   # Ready to go..
57322   if test "x$BUILD_FREETYPE" = xyes; then
57323     # msbuild requires trailing slashes for output directories
57324     freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
57325     freetype_lib_path_unix="$freetype_lib_path"
57326     freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
57327 
57328   unix_path="$vcxproj_path"
57329   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57330     windows_path=`$CYGPATH -m "$unix_path"`
57331     vcxproj_path="$windows_path"
57332   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57333     windows_path=`cmd //c echo $unix_path`
57334     vcxproj_path="$windows_path"
57335   fi
57336 
57337 
57338   unix_path="$freetype_lib_path"
57339   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57340     windows_path=`$CYGPATH -m "$unix_path"`
57341     freetype_lib_path="$windows_path"
57342   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57343     windows_path=`cmd //c echo $unix_path`
57344     freetype_lib_path="$windows_path"
57345   fi
57346 
57347 
57348   unix_path="$freetype_obj_path"
57349   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57350     windows_path=`$CYGPATH -m "$unix_path"`
57351     freetype_obj_path="$windows_path"
57352   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57353     windows_path=`cmd //c echo $unix_path`
57354     freetype_obj_path="$windows_path"
57355   fi
57356 
57357     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
57358       freetype_platform=x64
57359     else
57360       freetype_platform=win32
57361     fi
57362 
57363     # The original freetype project file is for VS 2010 (i.e. 'v100'),
57364     # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
57365     # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
57366     # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
57367     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
57368 $as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
57369 
57370     # First we try to build the freetype.dll
57371     $ECHO -e "@echo off\n"\
57372         "$MSBUILD $vcxproj_path "\
57373         "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57374         "/p:Configuration=\"Release Multithreaded\" "\
57375         "/p:Platform=$freetype_platform "\
57376         "/p:ConfigurationType=DynamicLibrary "\
57377         "/p:TargetName=freetype "\
57378         "/p:OutDir=\"$freetype_lib_path\" "\
57379         "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
57380     cmd /c freetype.bat
57381 
57382     if test -s "$freetype_lib_path_unix/freetype.dll"; then
57383       # If that succeeds we also build freetype.lib
57384       $ECHO -e "@echo off\n"\
57385           "$MSBUILD $vcxproj_path "\
57386           "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57387           "/p:Configuration=\"Release Multithreaded\" "\
57388           "/p:Platform=$freetype_platform "\
57389           "/p:ConfigurationType=StaticLibrary "\
57390           "/p:TargetName=freetype "\
57391           "/p:OutDir=\"$freetype_lib_path\" "\
57392           "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
57393       cmd /c freetype.bat
57394 
57395       if test -s "$freetype_lib_path_unix/freetype.lib"; then
57396         # Once we build both, lib and dll, set freetype lib and include path appropriately
57397         POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
57398         POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
57399         { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
57400 $as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
57401       else
57402         BUILD_FREETYPE=no
57403       fi
57404     else
57405       BUILD_FREETYPE=no
57406     fi
57407   fi
57408 
57409         if test "x$BUILD_FREETYPE" = xyes; then
57410           # Okay, we built it. Check that it works.
57411 
57412   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57413   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57414   METHOD="--with-freetype-src"
57415 
57416   # Let's start with an optimistic view of the world :-)
57417   FOUND_FREETYPE=yes
57418 
57419   # First look for the canonical freetype main include file ft2build.h.
57420   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57421     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57422     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57423     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57424       # Fail.
57425       FOUND_FREETYPE=no
57426     fi
57427   fi
57428 
57429   if test "x$FOUND_FREETYPE" = xyes; then
57430     # Include file found, let's continue the sanity check.
57431     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57432 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57433 
57434     # Reset to default value
57435     FREETYPE_BASE_NAME=freetype
57436     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57437     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57438       if test "x$OPENJDK_TARGET_OS" = xmacosx \
57439           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57440         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57441         # for the .6 version explicitly.
57442         FREETYPE_BASE_NAME=freetype.6
57443         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57444         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57445 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57446       else
57447         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57448 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57449         FOUND_FREETYPE=no
57450       fi
57451     else
57452       if test "x$OPENJDK_TARGET_OS" = xwindows; then
57453         # On Windows, we will need both .lib and .dll file.
57454         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57455           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57456 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57457           FOUND_FREETYPE=no
57458         fi
57459       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57460           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57461         # Found lib in isa dir, use that instead.
57462         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57463         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57464 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57465       fi
57466     fi
57467   fi
57468 
57469   if test "x$FOUND_FREETYPE" = xyes; then
57470 
57471   # Only process if variable expands to non-empty
57472 
57473   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57474     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57475 
57476   # Input might be given as Windows format, start by converting to
57477   # unix format.
57478   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57479   new_path=`$CYGPATH -u "$path"`
57480 
57481   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57482   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57483   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57484   # "foo.exe" is OK but "foo" is an error.
57485   #
57486   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57487   # It is also a way to make sure we got the proper file name for the real test later on.
57488   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57489   if test "x$test_shortpath" = x; then
57490     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57491 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57492     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57493   fi
57494 
57495   # Call helper function which possibly converts this using DOS-style short mode.
57496   # If so, the updated path is stored in $new_path.
57497 
57498   input_path="$new_path"
57499   # Check if we need to convert this using DOS-style short mode. If the path
57500   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57501   # take no chances and rewrite it.
57502   # Note: m4 eats our [], so we need to use [ and ] instead.
57503   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57504   if test "x$has_forbidden_chars" != x; then
57505     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57506     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57507     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57508     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57509       # Going to short mode and back again did indeed matter. Since short mode is
57510       # case insensitive, let's make it lowercase to improve readability.
57511       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57512       # Now convert it back to Unix-style (cygpath)
57513       input_path=`$CYGPATH -u "$shortmode_path"`
57514       new_path="$input_path"
57515     fi
57516   fi
57517 
57518   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57519   if test "x$test_cygdrive_prefix" = x; then
57520     # As a simple fix, exclude /usr/bin since it's not a real path.
57521     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57522       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57523       # a path prefixed by /cygdrive for fixpath to work.
57524       new_path="$CYGWIN_ROOT_PATH$input_path"
57525     fi
57526   fi
57527 
57528 
57529   if test "x$path" != "x$new_path"; then
57530     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57531     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57532 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57533   fi
57534 
57535     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57536 
57537   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57538   has_colon=`$ECHO $path | $GREP ^.:`
57539   new_path="$path"
57540   if test "x$has_colon" = x; then
57541     # Not in mixed or Windows style, start by that.
57542     new_path=`cmd //c echo $path`
57543   fi
57544 
57545 
57546   input_path="$new_path"
57547   # Check if we need to convert this using DOS-style short mode. If the path
57548   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57549   # take no chances and rewrite it.
57550   # Note: m4 eats our [], so we need to use [ and ] instead.
57551   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57552   if test "x$has_forbidden_chars" != x; then
57553     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57554     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57555   fi
57556 
57557 
57558   windows_path="$new_path"
57559   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57560     unix_path=`$CYGPATH -u "$windows_path"`
57561     new_path="$unix_path"
57562   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57563     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57564     new_path="$unix_path"
57565   fi
57566 
57567   if test "x$path" != "x$new_path"; then
57568     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57569     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57570 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57571   fi
57572 
57573   # Save the first 10 bytes of this path to the storage, so fixpath can work.
57574   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57575 
57576     else
57577       # We're on a unix platform. Hooray! :)
57578       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57579       has_space=`$ECHO "$path" | $GREP " "`
57580       if test "x$has_space" != x; then
57581         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57582 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57583         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57584       fi
57585 
57586       # Use eval to expand a potential ~
57587       eval path="$path"
57588       if test ! -f "$path" && test ! -d "$path"; then
57589         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57590       fi
57591 
57592       if test -d "$path"; then
57593         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57594       else
57595         dir="`$DIRNAME "$path"`"
57596         base="`$BASENAME "$path"`"
57597         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57598       fi
57599     fi
57600   fi
57601 
57602 
57603   # Only process if variable expands to non-empty
57604 
57605   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57606     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57607 
57608   # Input might be given as Windows format, start by converting to
57609   # unix format.
57610   path="$POTENTIAL_FREETYPE_LIB_PATH"
57611   new_path=`$CYGPATH -u "$path"`
57612 
57613   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57614   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57615   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57616   # "foo.exe" is OK but "foo" is an error.
57617   #
57618   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57619   # It is also a way to make sure we got the proper file name for the real test later on.
57620   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57621   if test "x$test_shortpath" = x; then
57622     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57623 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57624     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57625   fi
57626 
57627   # Call helper function which possibly converts this using DOS-style short mode.
57628   # If so, the updated path is stored in $new_path.
57629 
57630   input_path="$new_path"
57631   # Check if we need to convert this using DOS-style short mode. If the path
57632   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57633   # take no chances and rewrite it.
57634   # Note: m4 eats our [], so we need to use [ and ] instead.
57635   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57636   if test "x$has_forbidden_chars" != x; then
57637     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57638     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57639     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57640     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57641       # Going to short mode and back again did indeed matter. Since short mode is
57642       # case insensitive, let's make it lowercase to improve readability.
57643       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57644       # Now convert it back to Unix-style (cygpath)
57645       input_path=`$CYGPATH -u "$shortmode_path"`
57646       new_path="$input_path"
57647     fi
57648   fi
57649 
57650   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57651   if test "x$test_cygdrive_prefix" = x; then
57652     # As a simple fix, exclude /usr/bin since it's not a real path.
57653     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57654       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57655       # a path prefixed by /cygdrive for fixpath to work.
57656       new_path="$CYGWIN_ROOT_PATH$input_path"
57657     fi
57658   fi
57659 
57660 
57661   if test "x$path" != "x$new_path"; then
57662     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57663     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57664 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57665   fi
57666 
57667     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57668 
57669   path="$POTENTIAL_FREETYPE_LIB_PATH"
57670   has_colon=`$ECHO $path | $GREP ^.:`
57671   new_path="$path"
57672   if test "x$has_colon" = x; then
57673     # Not in mixed or Windows style, start by that.
57674     new_path=`cmd //c echo $path`
57675   fi
57676 
57677 
57678   input_path="$new_path"
57679   # Check if we need to convert this using DOS-style short mode. If the path
57680   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57681   # take no chances and rewrite it.
57682   # Note: m4 eats our [], so we need to use [ and ] instead.
57683   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57684   if test "x$has_forbidden_chars" != x; then
57685     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57686     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57687   fi
57688 
57689 
57690   windows_path="$new_path"
57691   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57692     unix_path=`$CYGPATH -u "$windows_path"`
57693     new_path="$unix_path"
57694   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57695     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57696     new_path="$unix_path"
57697   fi
57698 
57699   if test "x$path" != "x$new_path"; then
57700     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57701     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57702 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57703   fi
57704 
57705   # Save the first 10 bytes of this path to the storage, so fixpath can work.
57706   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57707 
57708     else
57709       # We're on a unix platform. Hooray! :)
57710       path="$POTENTIAL_FREETYPE_LIB_PATH"
57711       has_space=`$ECHO "$path" | $GREP " "`
57712       if test "x$has_space" != x; then
57713         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57714 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57715         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57716       fi
57717 
57718       # Use eval to expand a potential ~
57719       eval path="$path"
57720       if test ! -f "$path" && test ! -d "$path"; then
57721         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57722       fi
57723 
57724       if test -d "$path"; then
57725         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57726       else
57727         dir="`$DIRNAME "$path"`"
57728         base="`$BASENAME "$path"`"
57729         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57730       fi
57731     fi
57732   fi
57733 
57734 
57735     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57736     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57737 $as_echo_n "checking for freetype includes... " >&6; }
57738     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57739 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57740     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57741     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57742 $as_echo_n "checking for freetype libraries... " >&6; }
57743     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57744 $as_echo "$FREETYPE_LIB_PATH" >&6; }
57745   fi
57746 
57747           if test "x$FOUND_FREETYPE" != xyes; then
57748             as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
57749           fi
57750         else
57751           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
57752 $as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
57753           as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
57754         fi
57755       else
57756         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
57757 $as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
57758       fi
57759     fi
57760 
57761     if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
57762       # User has specified settings
57763 
57764       if test "x$BUNDLE_FREETYPE" = x; then
57765         # If not specified, default is to bundle freetype
57766         BUNDLE_FREETYPE=yes
57767       fi
57768 
57769       if test "x$with_freetype" != x; then
57770         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
57771         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
57772       fi
57773 
57774       # Allow --with-freetype-lib and --with-freetype-include to override
57775       if test "x$with_freetype_include" != x; then
57776         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
57777       fi
57778       if test "x$with_freetype_lib" != x; then
57779         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
57780       fi
57781 
57782       if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57783         # Okay, we got it. Check that it works.
57784 
57785   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57786   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57787   METHOD="--with-freetype"
57788 
57789   # Let's start with an optimistic view of the world :-)
57790   FOUND_FREETYPE=yes
57791 
57792   # First look for the canonical freetype main include file ft2build.h.
57793   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57794     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57795     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57796     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57797       # Fail.
57798       FOUND_FREETYPE=no
57799     fi
57800   fi
57801 
57802   if test "x$FOUND_FREETYPE" = xyes; then
57803     # Include file found, let's continue the sanity check.
57804     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57805 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57806 
57807     # Reset to default value
57808     FREETYPE_BASE_NAME=freetype
57809     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57810     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57811       if test "x$OPENJDK_TARGET_OS" = xmacosx \
57812           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57813         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57814         # for the .6 version explicitly.
57815         FREETYPE_BASE_NAME=freetype.6
57816         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57817         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57818 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57819       else
57820         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57821 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57822         FOUND_FREETYPE=no
57823       fi
57824     else
57825       if test "x$OPENJDK_TARGET_OS" = xwindows; then
57826         # On Windows, we will need both .lib and .dll file.
57827         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57828           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57829 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57830           FOUND_FREETYPE=no
57831         fi
57832       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57833           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57834         # Found lib in isa dir, use that instead.
57835         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57836         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57837 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57838       fi
57839     fi
57840   fi
57841 
57842   if test "x$FOUND_FREETYPE" = xyes; then
57843 
57844   # Only process if variable expands to non-empty
57845 
57846   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57847     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57848 
57849   # Input might be given as Windows format, start by converting to
57850   # unix format.
57851   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57852   new_path=`$CYGPATH -u "$path"`
57853 
57854   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57855   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57856   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57857   # "foo.exe" is OK but "foo" is an error.
57858   #
57859   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57860   # It is also a way to make sure we got the proper file name for the real test later on.
57861   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57862   if test "x$test_shortpath" = x; then
57863     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57864 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57865     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57866   fi
57867 
57868   # Call helper function which possibly converts this using DOS-style short mode.
57869   # If so, the updated path is stored in $new_path.
57870 
57871   input_path="$new_path"
57872   # Check if we need to convert this using DOS-style short mode. If the path
57873   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57874   # take no chances and rewrite it.
57875   # Note: m4 eats our [], so we need to use [ and ] instead.
57876   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57877   if test "x$has_forbidden_chars" != x; then
57878     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57879     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57880     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57881     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57882       # Going to short mode and back again did indeed matter. Since short mode is
57883       # case insensitive, let's make it lowercase to improve readability.
57884       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57885       # Now convert it back to Unix-style (cygpath)
57886       input_path=`$CYGPATH -u "$shortmode_path"`
57887       new_path="$input_path"
57888     fi
57889   fi
57890 
57891   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57892   if test "x$test_cygdrive_prefix" = x; then
57893     # As a simple fix, exclude /usr/bin since it's not a real path.
57894     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57895       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57896       # a path prefixed by /cygdrive for fixpath to work.
57897       new_path="$CYGWIN_ROOT_PATH$input_path"
57898     fi
57899   fi
57900 
57901 
57902   if test "x$path" != "x$new_path"; then
57903     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57904     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57905 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57906   fi
57907 
57908     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57909 
57910   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57911   has_colon=`$ECHO $path | $GREP ^.:`
57912   new_path="$path"
57913   if test "x$has_colon" = x; then
57914     # Not in mixed or Windows style, start by that.
57915     new_path=`cmd //c echo $path`
57916   fi
57917 
57918 
57919   input_path="$new_path"
57920   # Check if we need to convert this using DOS-style short mode. If the path
57921   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57922   # take no chances and rewrite it.
57923   # Note: m4 eats our [], so we need to use [ and ] instead.
57924   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57925   if test "x$has_forbidden_chars" != x; then
57926     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57927     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57928   fi
57929 
57930 
57931   windows_path="$new_path"
57932   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57933     unix_path=`$CYGPATH -u "$windows_path"`
57934     new_path="$unix_path"
57935   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57936     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57937     new_path="$unix_path"
57938   fi
57939 
57940   if test "x$path" != "x$new_path"; then
57941     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57942     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57943 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57944   fi
57945 
57946   # Save the first 10 bytes of this path to the storage, so fixpath can work.
57947   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57948 
57949     else
57950       # We're on a unix platform. Hooray! :)
57951       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57952       has_space=`$ECHO "$path" | $GREP " "`
57953       if test "x$has_space" != x; then
57954         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57955 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57956         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57957       fi
57958 
57959       # Use eval to expand a potential ~
57960       eval path="$path"
57961       if test ! -f "$path" && test ! -d "$path"; then
57962         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57963       fi
57964 
57965       if test -d "$path"; then
57966         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57967       else
57968         dir="`$DIRNAME "$path"`"
57969         base="`$BASENAME "$path"`"
57970         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57971       fi
57972     fi
57973   fi
57974 
57975 
57976   # Only process if variable expands to non-empty
57977 
57978   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57979     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57980 
57981   # Input might be given as Windows format, start by converting to
57982   # unix format.
57983   path="$POTENTIAL_FREETYPE_LIB_PATH"
57984   new_path=`$CYGPATH -u "$path"`
57985 
57986   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57987   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57988   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57989   # "foo.exe" is OK but "foo" is an error.
57990   #
57991   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57992   # It is also a way to make sure we got the proper file name for the real test later on.
57993   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57994   if test "x$test_shortpath" = x; then
57995     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57996 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57997     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57998   fi
57999 
58000   # Call helper function which possibly converts this using DOS-style short mode.
58001   # If so, the updated path is stored in $new_path.
58002 
58003   input_path="$new_path"
58004   # Check if we need to convert this using DOS-style short mode. If the path
58005   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58006   # take no chances and rewrite it.
58007   # Note: m4 eats our [], so we need to use [ and ] instead.
58008   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58009   if test "x$has_forbidden_chars" != x; then
58010     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58011     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58012     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58013     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58014       # Going to short mode and back again did indeed matter. Since short mode is
58015       # case insensitive, let's make it lowercase to improve readability.
58016       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58017       # Now convert it back to Unix-style (cygpath)
58018       input_path=`$CYGPATH -u "$shortmode_path"`
58019       new_path="$input_path"
58020     fi
58021   fi
58022 
58023   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58024   if test "x$test_cygdrive_prefix" = x; then
58025     # As a simple fix, exclude /usr/bin since it's not a real path.
58026     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58027       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58028       # a path prefixed by /cygdrive for fixpath to work.
58029       new_path="$CYGWIN_ROOT_PATH$input_path"
58030     fi
58031   fi
58032 
58033 
58034   if test "x$path" != "x$new_path"; then
58035     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58036     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58037 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58038   fi
58039 
58040     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58041 
58042   path="$POTENTIAL_FREETYPE_LIB_PATH"
58043   has_colon=`$ECHO $path | $GREP ^.:`
58044   new_path="$path"
58045   if test "x$has_colon" = x; then
58046     # Not in mixed or Windows style, start by that.
58047     new_path=`cmd //c echo $path`
58048   fi
58049 
58050 
58051   input_path="$new_path"
58052   # Check if we need to convert this using DOS-style short mode. If the path
58053   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58054   # take no chances and rewrite it.
58055   # Note: m4 eats our [], so we need to use [ and ] instead.
58056   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58057   if test "x$has_forbidden_chars" != x; then
58058     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58059     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58060   fi
58061 
58062 
58063   windows_path="$new_path"
58064   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58065     unix_path=`$CYGPATH -u "$windows_path"`
58066     new_path="$unix_path"
58067   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58068     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58069     new_path="$unix_path"
58070   fi
58071 
58072   if test "x$path" != "x$new_path"; then
58073     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58074     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58075 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58076   fi
58077 
58078   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58079   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58080 
58081     else
58082       # We're on a unix platform. Hooray! :)
58083       path="$POTENTIAL_FREETYPE_LIB_PATH"
58084       has_space=`$ECHO "$path" | $GREP " "`
58085       if test "x$has_space" != x; then
58086         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58087 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58088         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58089       fi
58090 
58091       # Use eval to expand a potential ~
58092       eval path="$path"
58093       if test ! -f "$path" && test ! -d "$path"; then
58094         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58095       fi
58096 
58097       if test -d "$path"; then
58098         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58099       else
58100         dir="`$DIRNAME "$path"`"
58101         base="`$BASENAME "$path"`"
58102         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58103       fi
58104     fi
58105   fi
58106 
58107 
58108     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58109     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58110 $as_echo_n "checking for freetype includes... " >&6; }
58111     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58112 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58113     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58114     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58115 $as_echo_n "checking for freetype libraries... " >&6; }
58116     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58117 $as_echo "$FREETYPE_LIB_PATH" >&6; }
58118   fi
58119 
58120         if test "x$FOUND_FREETYPE" != xyes; then
58121           as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
58122         fi
58123       else
58124         # User specified only one of lib or include. This is an error.
58125         if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
58126           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
58127 $as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
58128           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
58129         else
58130           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
58131 $as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
58132           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
58133         fi
58134       fi
58135     else
58136       # User did not specify settings, but we need freetype. Try to locate it.
58137 
58138       if test "x$BUNDLE_FREETYPE" = x; then
58139         # If not specified, default is to bundle freetype only on windows
58140         if test "x$OPENJDK_TARGET_OS" = xwindows; then
58141           BUNDLE_FREETYPE=yes
58142         else
58143           BUNDLE_FREETYPE=no
58144         fi
58145       fi
58146 
58147       # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
58148       if test "x$SYSROOT" = x; then
58149         if test "x$FOUND_FREETYPE" != xyes; then
58150           # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
58151           if test "x$PKG_CONFIG" != x; then
58152 
58153 pkg_failed=no
58154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
58155 $as_echo_n "checking for FREETYPE... " >&6; }
58156 
58157 if test -n "$FREETYPE_CFLAGS"; then
58158     pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
58159  elif test -n "$PKG_CONFIG"; then
58160     if test -n "$PKG_CONFIG" && \
58161     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
58162   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
58163   ac_status=$?
58164   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58165   test $ac_status = 0; }; then
58166   pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
58167 else
58168   pkg_failed=yes
58169 fi
58170  else
58171     pkg_failed=untried
58172 fi
58173 if test -n "$FREETYPE_LIBS"; then
58174     pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
58175  elif test -n "$PKG_CONFIG"; then
58176     if test -n "$PKG_CONFIG" && \
58177     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
58178   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
58179   ac_status=$?
58180   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58181   test $ac_status = 0; }; then
58182   pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
58183 else
58184   pkg_failed=yes
58185 fi
58186  else
58187     pkg_failed=untried
58188 fi
58189 
58190 
58191 
58192 if test $pkg_failed = yes; then
58193 
58194 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
58195         _pkg_short_errors_supported=yes
58196 else
58197         _pkg_short_errors_supported=no
58198 fi
58199         if test $_pkg_short_errors_supported = yes; then
58200                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
58201         else
58202                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
58203         fi
58204         # Put the nasty error message in config.log where it belongs
58205         echo "$FREETYPE_PKG_ERRORS" >&5
58206 
58207         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58208 $as_echo "no" >&6; }
58209                 FOUND_FREETYPE=no
58210 elif test $pkg_failed = untried; then
58211         FOUND_FREETYPE=no
58212 else
58213         FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
58214         FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
58215         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58216 $as_echo "yes" >&6; }
58217         FOUND_FREETYPE=yes
58218 fi
58219             if test "x$FOUND_FREETYPE" = xyes; then
58220               # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
58221               FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
58222               # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
58223               if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
58224                 FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
58225               fi
58226               # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
58227               if test "x$BUNDLE_FREETYPE" = xyes; then
58228                 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
58229 $as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
58230                 FOUND_FREETYPE=no
58231               else
58232                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
58233 $as_echo_n "checking for freetype... " >&6; }
58234                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
58235 $as_echo "yes (using pkg-config)" >&6; }
58236               fi
58237             fi
58238           fi
58239         fi
58240       fi
58241 
58242       if test "x$FOUND_FREETYPE" != xyes; then
58243         # Check in well-known locations
58244         if test "x$OPENJDK_TARGET_OS" = xwindows; then
58245           FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
58246 
58247   windows_path="$FREETYPE_BASE_DIR"
58248   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58249     unix_path=`$CYGPATH -u "$windows_path"`
58250     FREETYPE_BASE_DIR="$unix_path"
58251   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58252     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58253     FREETYPE_BASE_DIR="$unix_path"
58254   fi
58255 
58256 
58257   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58258   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58259   METHOD="well-known location"
58260 
58261   # Let's start with an optimistic view of the world :-)
58262   FOUND_FREETYPE=yes
58263 
58264   # First look for the canonical freetype main include file ft2build.h.
58265   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58266     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58267     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58268     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58269       # Fail.
58270       FOUND_FREETYPE=no
58271     fi
58272   fi
58273 
58274   if test "x$FOUND_FREETYPE" = xyes; then
58275     # Include file found, let's continue the sanity check.
58276     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58277 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58278 
58279     # Reset to default value
58280     FREETYPE_BASE_NAME=freetype
58281     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58282     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58283       if test "x$OPENJDK_TARGET_OS" = xmacosx \
58284           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58285         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58286         # for the .6 version explicitly.
58287         FREETYPE_BASE_NAME=freetype.6
58288         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58289         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58290 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58291       else
58292         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58293 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58294         FOUND_FREETYPE=no
58295       fi
58296     else
58297       if test "x$OPENJDK_TARGET_OS" = xwindows; then
58298         # On Windows, we will need both .lib and .dll file.
58299         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58300           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58301 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58302           FOUND_FREETYPE=no
58303         fi
58304       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58305           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58306         # Found lib in isa dir, use that instead.
58307         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58308         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58309 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58310       fi
58311     fi
58312   fi
58313 
58314   if test "x$FOUND_FREETYPE" = xyes; then
58315 
58316   # Only process if variable expands to non-empty
58317 
58318   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58319     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58320 
58321   # Input might be given as Windows format, start by converting to
58322   # unix format.
58323   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58324   new_path=`$CYGPATH -u "$path"`
58325 
58326   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58327   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58328   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58329   # "foo.exe" is OK but "foo" is an error.
58330   #
58331   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58332   # It is also a way to make sure we got the proper file name for the real test later on.
58333   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58334   if test "x$test_shortpath" = x; then
58335     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58336 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58337     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58338   fi
58339 
58340   # Call helper function which possibly converts this using DOS-style short mode.
58341   # If so, the updated path is stored in $new_path.
58342 
58343   input_path="$new_path"
58344   # Check if we need to convert this using DOS-style short mode. If the path
58345   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58346   # take no chances and rewrite it.
58347   # Note: m4 eats our [], so we need to use [ and ] instead.
58348   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58349   if test "x$has_forbidden_chars" != x; then
58350     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58351     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58352     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58353     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58354       # Going to short mode and back again did indeed matter. Since short mode is
58355       # case insensitive, let's make it lowercase to improve readability.
58356       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58357       # Now convert it back to Unix-style (cygpath)
58358       input_path=`$CYGPATH -u "$shortmode_path"`
58359       new_path="$input_path"
58360     fi
58361   fi
58362 
58363   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58364   if test "x$test_cygdrive_prefix" = x; then
58365     # As a simple fix, exclude /usr/bin since it's not a real path.
58366     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58367       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58368       # a path prefixed by /cygdrive for fixpath to work.
58369       new_path="$CYGWIN_ROOT_PATH$input_path"
58370     fi
58371   fi
58372 
58373 
58374   if test "x$path" != "x$new_path"; then
58375     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58376     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58377 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58378   fi
58379 
58380     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58381 
58382   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58383   has_colon=`$ECHO $path | $GREP ^.:`
58384   new_path="$path"
58385   if test "x$has_colon" = x; then
58386     # Not in mixed or Windows style, start by that.
58387     new_path=`cmd //c echo $path`
58388   fi
58389 
58390 
58391   input_path="$new_path"
58392   # Check if we need to convert this using DOS-style short mode. If the path
58393   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58394   # take no chances and rewrite it.
58395   # Note: m4 eats our [], so we need to use [ and ] instead.
58396   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58397   if test "x$has_forbidden_chars" != x; then
58398     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58399     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58400   fi
58401 
58402 
58403   windows_path="$new_path"
58404   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58405     unix_path=`$CYGPATH -u "$windows_path"`
58406     new_path="$unix_path"
58407   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58408     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58409     new_path="$unix_path"
58410   fi
58411 
58412   if test "x$path" != "x$new_path"; then
58413     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58414     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58415 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58416   fi
58417 
58418   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58419   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58420 
58421     else
58422       # We're on a unix platform. Hooray! :)
58423       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58424       has_space=`$ECHO "$path" | $GREP " "`
58425       if test "x$has_space" != x; then
58426         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58427 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58428         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58429       fi
58430 
58431       # Use eval to expand a potential ~
58432       eval path="$path"
58433       if test ! -f "$path" && test ! -d "$path"; then
58434         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58435       fi
58436 
58437       if test -d "$path"; then
58438         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58439       else
58440         dir="`$DIRNAME "$path"`"
58441         base="`$BASENAME "$path"`"
58442         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58443       fi
58444     fi
58445   fi
58446 
58447 
58448   # Only process if variable expands to non-empty
58449 
58450   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58451     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58452 
58453   # Input might be given as Windows format, start by converting to
58454   # unix format.
58455   path="$POTENTIAL_FREETYPE_LIB_PATH"
58456   new_path=`$CYGPATH -u "$path"`
58457 
58458   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58459   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58460   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58461   # "foo.exe" is OK but "foo" is an error.
58462   #
58463   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58464   # It is also a way to make sure we got the proper file name for the real test later on.
58465   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58466   if test "x$test_shortpath" = x; then
58467     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58468 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58469     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58470   fi
58471 
58472   # Call helper function which possibly converts this using DOS-style short mode.
58473   # If so, the updated path is stored in $new_path.
58474 
58475   input_path="$new_path"
58476   # Check if we need to convert this using DOS-style short mode. If the path
58477   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58478   # take no chances and rewrite it.
58479   # Note: m4 eats our [], so we need to use [ and ] instead.
58480   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58481   if test "x$has_forbidden_chars" != x; then
58482     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58483     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58484     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58485     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58486       # Going to short mode and back again did indeed matter. Since short mode is
58487       # case insensitive, let's make it lowercase to improve readability.
58488       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58489       # Now convert it back to Unix-style (cygpath)
58490       input_path=`$CYGPATH -u "$shortmode_path"`
58491       new_path="$input_path"
58492     fi
58493   fi
58494 
58495   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58496   if test "x$test_cygdrive_prefix" = x; then
58497     # As a simple fix, exclude /usr/bin since it's not a real path.
58498     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58499       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58500       # a path prefixed by /cygdrive for fixpath to work.
58501       new_path="$CYGWIN_ROOT_PATH$input_path"
58502     fi
58503   fi
58504 
58505 
58506   if test "x$path" != "x$new_path"; then
58507     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58508     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58509 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58510   fi
58511 
58512     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58513 
58514   path="$POTENTIAL_FREETYPE_LIB_PATH"
58515   has_colon=`$ECHO $path | $GREP ^.:`
58516   new_path="$path"
58517   if test "x$has_colon" = x; then
58518     # Not in mixed or Windows style, start by that.
58519     new_path=`cmd //c echo $path`
58520   fi
58521 
58522 
58523   input_path="$new_path"
58524   # Check if we need to convert this using DOS-style short mode. If the path
58525   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58526   # take no chances and rewrite it.
58527   # Note: m4 eats our [], so we need to use [ and ] instead.
58528   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58529   if test "x$has_forbidden_chars" != x; then
58530     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58531     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58532   fi
58533 
58534 
58535   windows_path="$new_path"
58536   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58537     unix_path=`$CYGPATH -u "$windows_path"`
58538     new_path="$unix_path"
58539   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58540     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58541     new_path="$unix_path"
58542   fi
58543 
58544   if test "x$path" != "x$new_path"; then
58545     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58546     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58547 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58548   fi
58549 
58550   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58551   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58552 
58553     else
58554       # We're on a unix platform. Hooray! :)
58555       path="$POTENTIAL_FREETYPE_LIB_PATH"
58556       has_space=`$ECHO "$path" | $GREP " "`
58557       if test "x$has_space" != x; then
58558         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58559 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58560         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58561       fi
58562 
58563       # Use eval to expand a potential ~
58564       eval path="$path"
58565       if test ! -f "$path" && test ! -d "$path"; then
58566         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58567       fi
58568 
58569       if test -d "$path"; then
58570         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58571       else
58572         dir="`$DIRNAME "$path"`"
58573         base="`$BASENAME "$path"`"
58574         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58575       fi
58576     fi
58577   fi
58578 
58579 
58580     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58581     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58582 $as_echo_n "checking for freetype includes... " >&6; }
58583     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58584 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58585     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58586     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58587 $as_echo_n "checking for freetype libraries... " >&6; }
58588     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58589 $as_echo "$FREETYPE_LIB_PATH" >&6; }
58590   fi
58591 
58592           if test "x$FOUND_FREETYPE" != xyes; then
58593             FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
58594 
58595   windows_path="$FREETYPE_BASE_DIR"
58596   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58597     unix_path=`$CYGPATH -u "$windows_path"`
58598     FREETYPE_BASE_DIR="$unix_path"
58599   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58600     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58601     FREETYPE_BASE_DIR="$unix_path"
58602   fi
58603 
58604 
58605   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58606   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58607   METHOD="well-known location"
58608 
58609   # Let's start with an optimistic view of the world :-)
58610   FOUND_FREETYPE=yes
58611 
58612   # First look for the canonical freetype main include file ft2build.h.
58613   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58614     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58615     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58616     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58617       # Fail.
58618       FOUND_FREETYPE=no
58619     fi
58620   fi
58621 
58622   if test "x$FOUND_FREETYPE" = xyes; then
58623     # Include file found, let's continue the sanity check.
58624     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58625 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58626 
58627     # Reset to default value
58628     FREETYPE_BASE_NAME=freetype
58629     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58630     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58631       if test "x$OPENJDK_TARGET_OS" = xmacosx \
58632           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58633         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58634         # for the .6 version explicitly.
58635         FREETYPE_BASE_NAME=freetype.6
58636         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58637         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58638 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58639       else
58640         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58641 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58642         FOUND_FREETYPE=no
58643       fi
58644     else
58645       if test "x$OPENJDK_TARGET_OS" = xwindows; then
58646         # On Windows, we will need both .lib and .dll file.
58647         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58648           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58649 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58650           FOUND_FREETYPE=no
58651         fi
58652       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58653           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58654         # Found lib in isa dir, use that instead.
58655         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58656         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58657 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58658       fi
58659     fi
58660   fi
58661 
58662   if test "x$FOUND_FREETYPE" = xyes; then
58663 
58664   # Only process if variable expands to non-empty
58665 
58666   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58667     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58668 
58669   # Input might be given as Windows format, start by converting to
58670   # unix format.
58671   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58672   new_path=`$CYGPATH -u "$path"`
58673 
58674   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58675   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58676   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58677   # "foo.exe" is OK but "foo" is an error.
58678   #
58679   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58680   # It is also a way to make sure we got the proper file name for the real test later on.
58681   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58682   if test "x$test_shortpath" = x; then
58683     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58684 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58685     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58686   fi
58687 
58688   # Call helper function which possibly converts this using DOS-style short mode.
58689   # If so, the updated path is stored in $new_path.
58690 
58691   input_path="$new_path"
58692   # Check if we need to convert this using DOS-style short mode. If the path
58693   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58694   # take no chances and rewrite it.
58695   # Note: m4 eats our [], so we need to use [ and ] instead.
58696   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58697   if test "x$has_forbidden_chars" != x; then
58698     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58699     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58700     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58701     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58702       # Going to short mode and back again did indeed matter. Since short mode is
58703       # case insensitive, let's make it lowercase to improve readability.
58704       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58705       # Now convert it back to Unix-style (cygpath)
58706       input_path=`$CYGPATH -u "$shortmode_path"`
58707       new_path="$input_path"
58708     fi
58709   fi
58710 
58711   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58712   if test "x$test_cygdrive_prefix" = x; then
58713     # As a simple fix, exclude /usr/bin since it's not a real path.
58714     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58715       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58716       # a path prefixed by /cygdrive for fixpath to work.
58717       new_path="$CYGWIN_ROOT_PATH$input_path"
58718     fi
58719   fi
58720 
58721 
58722   if test "x$path" != "x$new_path"; then
58723     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58724     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58725 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58726   fi
58727 
58728     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58729 
58730   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58731   has_colon=`$ECHO $path | $GREP ^.:`
58732   new_path="$path"
58733   if test "x$has_colon" = x; then
58734     # Not in mixed or Windows style, start by that.
58735     new_path=`cmd //c echo $path`
58736   fi
58737 
58738 
58739   input_path="$new_path"
58740   # Check if we need to convert this using DOS-style short mode. If the path
58741   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58742   # take no chances and rewrite it.
58743   # Note: m4 eats our [], so we need to use [ and ] instead.
58744   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58745   if test "x$has_forbidden_chars" != x; then
58746     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58747     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58748   fi
58749 
58750 
58751   windows_path="$new_path"
58752   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58753     unix_path=`$CYGPATH -u "$windows_path"`
58754     new_path="$unix_path"
58755   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58756     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58757     new_path="$unix_path"
58758   fi
58759 
58760   if test "x$path" != "x$new_path"; then
58761     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58762     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58763 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58764   fi
58765 
58766   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58767   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58768 
58769     else
58770       # We're on a unix platform. Hooray! :)
58771       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58772       has_space=`$ECHO "$path" | $GREP " "`
58773       if test "x$has_space" != x; then
58774         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58775 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58776         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58777       fi
58778 
58779       # Use eval to expand a potential ~
58780       eval path="$path"
58781       if test ! -f "$path" && test ! -d "$path"; then
58782         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58783       fi
58784 
58785       if test -d "$path"; then
58786         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58787       else
58788         dir="`$DIRNAME "$path"`"
58789         base="`$BASENAME "$path"`"
58790         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58791       fi
58792     fi
58793   fi
58794 
58795 
58796   # Only process if variable expands to non-empty
58797 
58798   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58799     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58800 
58801   # Input might be given as Windows format, start by converting to
58802   # unix format.
58803   path="$POTENTIAL_FREETYPE_LIB_PATH"
58804   new_path=`$CYGPATH -u "$path"`
58805 
58806   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58807   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58808   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58809   # "foo.exe" is OK but "foo" is an error.
58810   #
58811   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58812   # It is also a way to make sure we got the proper file name for the real test later on.
58813   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58814   if test "x$test_shortpath" = x; then
58815     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58816 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58817     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58818   fi
58819 
58820   # Call helper function which possibly converts this using DOS-style short mode.
58821   # If so, the updated path is stored in $new_path.
58822 
58823   input_path="$new_path"
58824   # Check if we need to convert this using DOS-style short mode. If the path
58825   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58826   # take no chances and rewrite it.
58827   # Note: m4 eats our [], so we need to use [ and ] instead.
58828   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58829   if test "x$has_forbidden_chars" != x; then
58830     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58831     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58832     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58833     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58834       # Going to short mode and back again did indeed matter. Since short mode is
58835       # case insensitive, let's make it lowercase to improve readability.
58836       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58837       # Now convert it back to Unix-style (cygpath)
58838       input_path=`$CYGPATH -u "$shortmode_path"`
58839       new_path="$input_path"
58840     fi
58841   fi
58842 
58843   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58844   if test "x$test_cygdrive_prefix" = x; then
58845     # As a simple fix, exclude /usr/bin since it's not a real path.
58846     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58847       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58848       # a path prefixed by /cygdrive for fixpath to work.
58849       new_path="$CYGWIN_ROOT_PATH$input_path"
58850     fi
58851   fi
58852 
58853 
58854   if test "x$path" != "x$new_path"; then
58855     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58856     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58857 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58858   fi
58859 
58860     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58861 
58862   path="$POTENTIAL_FREETYPE_LIB_PATH"
58863   has_colon=`$ECHO $path | $GREP ^.:`
58864   new_path="$path"
58865   if test "x$has_colon" = x; then
58866     # Not in mixed or Windows style, start by that.
58867     new_path=`cmd //c echo $path`
58868   fi
58869 
58870 
58871   input_path="$new_path"
58872   # Check if we need to convert this using DOS-style short mode. If the path
58873   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58874   # take no chances and rewrite it.
58875   # Note: m4 eats our [], so we need to use [ and ] instead.
58876   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58877   if test "x$has_forbidden_chars" != x; then
58878     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58879     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58880   fi
58881 
58882 
58883   windows_path="$new_path"
58884   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58885     unix_path=`$CYGPATH -u "$windows_path"`
58886     new_path="$unix_path"
58887   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58888     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58889     new_path="$unix_path"
58890   fi
58891 
58892   if test "x$path" != "x$new_path"; then
58893     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58894     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58895 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58896   fi
58897 
58898   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58899   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58900 
58901     else
58902       # We're on a unix platform. Hooray! :)
58903       path="$POTENTIAL_FREETYPE_LIB_PATH"
58904       has_space=`$ECHO "$path" | $GREP " "`
58905       if test "x$has_space" != x; then
58906         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58907 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58908         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58909       fi
58910 
58911       # Use eval to expand a potential ~
58912       eval path="$path"
58913       if test ! -f "$path" && test ! -d "$path"; then
58914         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58915       fi
58916 
58917       if test -d "$path"; then
58918         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58919       else
58920         dir="`$DIRNAME "$path"`"
58921         base="`$BASENAME "$path"`"
58922         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58923       fi
58924     fi
58925   fi
58926 
58927 
58928     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58929     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58930 $as_echo_n "checking for freetype includes... " >&6; }
58931     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58932 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58933     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58934     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58935 $as_echo_n "checking for freetype libraries... " >&6; }
58936     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58937 $as_echo "$FREETYPE_LIB_PATH" >&6; }
58938   fi
58939 
58940           fi
58941           if test "x$FOUND_FREETYPE" != xyes; then
58942             FREETYPE_BASE_DIR="$HOME/freetype"
58943 
58944   windows_path="$FREETYPE_BASE_DIR"
58945   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58946     unix_path=`$CYGPATH -u "$windows_path"`
58947     FREETYPE_BASE_DIR="$unix_path"
58948   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58949     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58950     FREETYPE_BASE_DIR="$unix_path"
58951   fi
58952 
58953             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58954 
58955   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58956   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
58957   METHOD="well-known location"
58958 
58959   # Let's start with an optimistic view of the world :-)
58960   FOUND_FREETYPE=yes
58961 
58962   # First look for the canonical freetype main include file ft2build.h.
58963   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58964     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58965     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58966     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58967       # Fail.
58968       FOUND_FREETYPE=no
58969     fi
58970   fi
58971 
58972   if test "x$FOUND_FREETYPE" = xyes; then
58973     # Include file found, let's continue the sanity check.
58974     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58975 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58976 
58977     # Reset to default value
58978     FREETYPE_BASE_NAME=freetype
58979     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58980     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58981       if test "x$OPENJDK_TARGET_OS" = xmacosx \
58982           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58983         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58984         # for the .6 version explicitly.
58985         FREETYPE_BASE_NAME=freetype.6
58986         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58987         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58988 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58989       else
58990         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58991 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58992         FOUND_FREETYPE=no
58993       fi
58994     else
58995       if test "x$OPENJDK_TARGET_OS" = xwindows; then
58996         # On Windows, we will need both .lib and .dll file.
58997         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58998           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58999 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59000           FOUND_FREETYPE=no
59001         fi
59002       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59003           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59004         # Found lib in isa dir, use that instead.
59005         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59006         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59007 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59008       fi
59009     fi
59010   fi
59011 
59012   if test "x$FOUND_FREETYPE" = xyes; then
59013 
59014   # Only process if variable expands to non-empty
59015 
59016   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59017     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59018 
59019   # Input might be given as Windows format, start by converting to
59020   # unix format.
59021   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59022   new_path=`$CYGPATH -u "$path"`
59023 
59024   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59025   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59026   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59027   # "foo.exe" is OK but "foo" is an error.
59028   #
59029   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59030   # It is also a way to make sure we got the proper file name for the real test later on.
59031   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59032   if test "x$test_shortpath" = x; then
59033     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59034 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59035     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59036   fi
59037 
59038   # Call helper function which possibly converts this using DOS-style short mode.
59039   # If so, the updated path is stored in $new_path.
59040 
59041   input_path="$new_path"
59042   # Check if we need to convert this using DOS-style short mode. If the path
59043   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59044   # take no chances and rewrite it.
59045   # Note: m4 eats our [], so we need to use [ and ] instead.
59046   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59047   if test "x$has_forbidden_chars" != x; then
59048     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59049     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59050     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59051     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59052       # Going to short mode and back again did indeed matter. Since short mode is
59053       # case insensitive, let's make it lowercase to improve readability.
59054       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59055       # Now convert it back to Unix-style (cygpath)
59056       input_path=`$CYGPATH -u "$shortmode_path"`
59057       new_path="$input_path"
59058     fi
59059   fi
59060 
59061   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59062   if test "x$test_cygdrive_prefix" = x; then
59063     # As a simple fix, exclude /usr/bin since it's not a real path.
59064     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59065       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59066       # a path prefixed by /cygdrive for fixpath to work.
59067       new_path="$CYGWIN_ROOT_PATH$input_path"
59068     fi
59069   fi
59070 
59071 
59072   if test "x$path" != "x$new_path"; then
59073     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59074     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59075 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59076   fi
59077 
59078     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59079 
59080   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59081   has_colon=`$ECHO $path | $GREP ^.:`
59082   new_path="$path"
59083   if test "x$has_colon" = x; then
59084     # Not in mixed or Windows style, start by that.
59085     new_path=`cmd //c echo $path`
59086   fi
59087 
59088 
59089   input_path="$new_path"
59090   # Check if we need to convert this using DOS-style short mode. If the path
59091   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59092   # take no chances and rewrite it.
59093   # Note: m4 eats our [], so we need to use [ and ] instead.
59094   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59095   if test "x$has_forbidden_chars" != x; then
59096     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59097     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59098   fi
59099 
59100 
59101   windows_path="$new_path"
59102   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59103     unix_path=`$CYGPATH -u "$windows_path"`
59104     new_path="$unix_path"
59105   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59106     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59107     new_path="$unix_path"
59108   fi
59109 
59110   if test "x$path" != "x$new_path"; then
59111     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59112     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59113 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59114   fi
59115 
59116   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59117   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59118 
59119     else
59120       # We're on a unix platform. Hooray! :)
59121       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59122       has_space=`$ECHO "$path" | $GREP " "`
59123       if test "x$has_space" != x; then
59124         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59125 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59126         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59127       fi
59128 
59129       # Use eval to expand a potential ~
59130       eval path="$path"
59131       if test ! -f "$path" && test ! -d "$path"; then
59132         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59133       fi
59134 
59135       if test -d "$path"; then
59136         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59137       else
59138         dir="`$DIRNAME "$path"`"
59139         base="`$BASENAME "$path"`"
59140         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59141       fi
59142     fi
59143   fi
59144 
59145 
59146   # Only process if variable expands to non-empty
59147 
59148   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59149     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59150 
59151   # Input might be given as Windows format, start by converting to
59152   # unix format.
59153   path="$POTENTIAL_FREETYPE_LIB_PATH"
59154   new_path=`$CYGPATH -u "$path"`
59155 
59156   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59157   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59158   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59159   # "foo.exe" is OK but "foo" is an error.
59160   #
59161   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59162   # It is also a way to make sure we got the proper file name for the real test later on.
59163   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59164   if test "x$test_shortpath" = x; then
59165     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59166 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59167     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59168   fi
59169 
59170   # Call helper function which possibly converts this using DOS-style short mode.
59171   # If so, the updated path is stored in $new_path.
59172 
59173   input_path="$new_path"
59174   # Check if we need to convert this using DOS-style short mode. If the path
59175   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59176   # take no chances and rewrite it.
59177   # Note: m4 eats our [], so we need to use [ and ] instead.
59178   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59179   if test "x$has_forbidden_chars" != x; then
59180     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59181     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59182     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59183     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59184       # Going to short mode and back again did indeed matter. Since short mode is
59185       # case insensitive, let's make it lowercase to improve readability.
59186       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59187       # Now convert it back to Unix-style (cygpath)
59188       input_path=`$CYGPATH -u "$shortmode_path"`
59189       new_path="$input_path"
59190     fi
59191   fi
59192 
59193   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59194   if test "x$test_cygdrive_prefix" = x; then
59195     # As a simple fix, exclude /usr/bin since it's not a real path.
59196     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59197       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59198       # a path prefixed by /cygdrive for fixpath to work.
59199       new_path="$CYGWIN_ROOT_PATH$input_path"
59200     fi
59201   fi
59202 
59203 
59204   if test "x$path" != "x$new_path"; then
59205     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59206     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59207 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59208   fi
59209 
59210     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59211 
59212   path="$POTENTIAL_FREETYPE_LIB_PATH"
59213   has_colon=`$ECHO $path | $GREP ^.:`
59214   new_path="$path"
59215   if test "x$has_colon" = x; then
59216     # Not in mixed or Windows style, start by that.
59217     new_path=`cmd //c echo $path`
59218   fi
59219 
59220 
59221   input_path="$new_path"
59222   # Check if we need to convert this using DOS-style short mode. If the path
59223   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59224   # take no chances and rewrite it.
59225   # Note: m4 eats our [], so we need to use [ and ] instead.
59226   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59227   if test "x$has_forbidden_chars" != x; then
59228     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59229     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59230   fi
59231 
59232 
59233   windows_path="$new_path"
59234   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59235     unix_path=`$CYGPATH -u "$windows_path"`
59236     new_path="$unix_path"
59237   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59238     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59239     new_path="$unix_path"
59240   fi
59241 
59242   if test "x$path" != "x$new_path"; then
59243     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59244     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59245 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59246   fi
59247 
59248   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59249   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59250 
59251     else
59252       # We're on a unix platform. Hooray! :)
59253       path="$POTENTIAL_FREETYPE_LIB_PATH"
59254       has_space=`$ECHO "$path" | $GREP " "`
59255       if test "x$has_space" != x; then
59256         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59257 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59258         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59259       fi
59260 
59261       # Use eval to expand a potential ~
59262       eval path="$path"
59263       if test ! -f "$path" && test ! -d "$path"; then
59264         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59265       fi
59266 
59267       if test -d "$path"; then
59268         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59269       else
59270         dir="`$DIRNAME "$path"`"
59271         base="`$BASENAME "$path"`"
59272         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59273       fi
59274     fi
59275   fi
59276 
59277 
59278     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59279     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59280 $as_echo_n "checking for freetype includes... " >&6; }
59281     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59282 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59283     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59284     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59285 $as_echo_n "checking for freetype libraries... " >&6; }
59286     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59287 $as_echo "$FREETYPE_LIB_PATH" >&6; }
59288   fi
59289 
59290             else
59291 
59292   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59293   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59294   METHOD="well-known location"
59295 
59296   # Let's start with an optimistic view of the world :-)
59297   FOUND_FREETYPE=yes
59298 
59299   # First look for the canonical freetype main include file ft2build.h.
59300   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59301     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59302     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59303     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59304       # Fail.
59305       FOUND_FREETYPE=no
59306     fi
59307   fi
59308 
59309   if test "x$FOUND_FREETYPE" = xyes; then
59310     # Include file found, let's continue the sanity check.
59311     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59312 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59313 
59314     # Reset to default value
59315     FREETYPE_BASE_NAME=freetype
59316     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59317     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59318       if test "x$OPENJDK_TARGET_OS" = xmacosx \
59319           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59320         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59321         # for the .6 version explicitly.
59322         FREETYPE_BASE_NAME=freetype.6
59323         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59324         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59325 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59326       else
59327         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59328 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59329         FOUND_FREETYPE=no
59330       fi
59331     else
59332       if test "x$OPENJDK_TARGET_OS" = xwindows; then
59333         # On Windows, we will need both .lib and .dll file.
59334         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59335           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59336 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59337           FOUND_FREETYPE=no
59338         fi
59339       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59340           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59341         # Found lib in isa dir, use that instead.
59342         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59343         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59344 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59345       fi
59346     fi
59347   fi
59348 
59349   if test "x$FOUND_FREETYPE" = xyes; then
59350 
59351   # Only process if variable expands to non-empty
59352 
59353   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59354     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59355 
59356   # Input might be given as Windows format, start by converting to
59357   # unix format.
59358   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59359   new_path=`$CYGPATH -u "$path"`
59360 
59361   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59362   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59363   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59364   # "foo.exe" is OK but "foo" is an error.
59365   #
59366   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59367   # It is also a way to make sure we got the proper file name for the real test later on.
59368   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59369   if test "x$test_shortpath" = x; then
59370     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59371 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59372     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59373   fi
59374 
59375   # Call helper function which possibly converts this using DOS-style short mode.
59376   # If so, the updated path is stored in $new_path.
59377 
59378   input_path="$new_path"
59379   # Check if we need to convert this using DOS-style short mode. If the path
59380   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59381   # take no chances and rewrite it.
59382   # Note: m4 eats our [], so we need to use [ and ] instead.
59383   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59384   if test "x$has_forbidden_chars" != x; then
59385     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59386     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59387     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59388     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59389       # Going to short mode and back again did indeed matter. Since short mode is
59390       # case insensitive, let's make it lowercase to improve readability.
59391       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59392       # Now convert it back to Unix-style (cygpath)
59393       input_path=`$CYGPATH -u "$shortmode_path"`
59394       new_path="$input_path"
59395     fi
59396   fi
59397 
59398   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59399   if test "x$test_cygdrive_prefix" = x; then
59400     # As a simple fix, exclude /usr/bin since it's not a real path.
59401     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59402       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59403       # a path prefixed by /cygdrive for fixpath to work.
59404       new_path="$CYGWIN_ROOT_PATH$input_path"
59405     fi
59406   fi
59407 
59408 
59409   if test "x$path" != "x$new_path"; then
59410     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59411     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59412 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59413   fi
59414 
59415     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59416 
59417   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59418   has_colon=`$ECHO $path | $GREP ^.:`
59419   new_path="$path"
59420   if test "x$has_colon" = x; then
59421     # Not in mixed or Windows style, start by that.
59422     new_path=`cmd //c echo $path`
59423   fi
59424 
59425 
59426   input_path="$new_path"
59427   # Check if we need to convert this using DOS-style short mode. If the path
59428   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59429   # take no chances and rewrite it.
59430   # Note: m4 eats our [], so we need to use [ and ] instead.
59431   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59432   if test "x$has_forbidden_chars" != x; then
59433     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59434     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59435   fi
59436 
59437 
59438   windows_path="$new_path"
59439   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59440     unix_path=`$CYGPATH -u "$windows_path"`
59441     new_path="$unix_path"
59442   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59443     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59444     new_path="$unix_path"
59445   fi
59446 
59447   if test "x$path" != "x$new_path"; then
59448     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59449     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59450 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59451   fi
59452 
59453   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59454   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59455 
59456     else
59457       # We're on a unix platform. Hooray! :)
59458       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59459       has_space=`$ECHO "$path" | $GREP " "`
59460       if test "x$has_space" != x; then
59461         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59462 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59463         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59464       fi
59465 
59466       # Use eval to expand a potential ~
59467       eval path="$path"
59468       if test ! -f "$path" && test ! -d "$path"; then
59469         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59470       fi
59471 
59472       if test -d "$path"; then
59473         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59474       else
59475         dir="`$DIRNAME "$path"`"
59476         base="`$BASENAME "$path"`"
59477         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59478       fi
59479     fi
59480   fi
59481 
59482 
59483   # Only process if variable expands to non-empty
59484 
59485   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59486     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59487 
59488   # Input might be given as Windows format, start by converting to
59489   # unix format.
59490   path="$POTENTIAL_FREETYPE_LIB_PATH"
59491   new_path=`$CYGPATH -u "$path"`
59492 
59493   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59494   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59495   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59496   # "foo.exe" is OK but "foo" is an error.
59497   #
59498   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59499   # It is also a way to make sure we got the proper file name for the real test later on.
59500   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59501   if test "x$test_shortpath" = x; then
59502     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59503 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59504     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59505   fi
59506 
59507   # Call helper function which possibly converts this using DOS-style short mode.
59508   # If so, the updated path is stored in $new_path.
59509 
59510   input_path="$new_path"
59511   # Check if we need to convert this using DOS-style short mode. If the path
59512   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59513   # take no chances and rewrite it.
59514   # Note: m4 eats our [], so we need to use [ and ] instead.
59515   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59516   if test "x$has_forbidden_chars" != x; then
59517     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59518     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59519     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59520     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59521       # Going to short mode and back again did indeed matter. Since short mode is
59522       # case insensitive, let's make it lowercase to improve readability.
59523       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59524       # Now convert it back to Unix-style (cygpath)
59525       input_path=`$CYGPATH -u "$shortmode_path"`
59526       new_path="$input_path"
59527     fi
59528   fi
59529 
59530   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59531   if test "x$test_cygdrive_prefix" = x; then
59532     # As a simple fix, exclude /usr/bin since it's not a real path.
59533     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59534       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59535       # a path prefixed by /cygdrive for fixpath to work.
59536       new_path="$CYGWIN_ROOT_PATH$input_path"
59537     fi
59538   fi
59539 
59540 
59541   if test "x$path" != "x$new_path"; then
59542     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59543     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59544 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59545   fi
59546 
59547     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59548 
59549   path="$POTENTIAL_FREETYPE_LIB_PATH"
59550   has_colon=`$ECHO $path | $GREP ^.:`
59551   new_path="$path"
59552   if test "x$has_colon" = x; then
59553     # Not in mixed or Windows style, start by that.
59554     new_path=`cmd //c echo $path`
59555   fi
59556 
59557 
59558   input_path="$new_path"
59559   # Check if we need to convert this using DOS-style short mode. If the path
59560   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59561   # take no chances and rewrite it.
59562   # Note: m4 eats our [], so we need to use [ and ] instead.
59563   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59564   if test "x$has_forbidden_chars" != x; then
59565     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59566     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59567   fi
59568 
59569 
59570   windows_path="$new_path"
59571   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59572     unix_path=`$CYGPATH -u "$windows_path"`
59573     new_path="$unix_path"
59574   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59575     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59576     new_path="$unix_path"
59577   fi
59578 
59579   if test "x$path" != "x$new_path"; then
59580     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59581     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59582 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59583   fi
59584 
59585   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59586   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59587 
59588     else
59589       # We're on a unix platform. Hooray! :)
59590       path="$POTENTIAL_FREETYPE_LIB_PATH"
59591       has_space=`$ECHO "$path" | $GREP " "`
59592       if test "x$has_space" != x; then
59593         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59594 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59595         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59596       fi
59597 
59598       # Use eval to expand a potential ~
59599       eval path="$path"
59600       if test ! -f "$path" && test ! -d "$path"; then
59601         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59602       fi
59603 
59604       if test -d "$path"; then
59605         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59606       else
59607         dir="`$DIRNAME "$path"`"
59608         base="`$BASENAME "$path"`"
59609         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59610       fi
59611     fi
59612   fi
59613 
59614 
59615     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59616     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59617 $as_echo_n "checking for freetype includes... " >&6; }
59618     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59619 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59620     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59621     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59622 $as_echo_n "checking for freetype libraries... " >&6; }
59623     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59624 $as_echo "$FREETYPE_LIB_PATH" >&6; }
59625   fi
59626 
59627             fi
59628             if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
59629                 && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
59630               # Source is available, as a last resort try to build freetype in default location
59631 
59632   FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
59633   BUILD_FREETYPE=yes
59634 
59635   # Check if the freetype sources are acessible..
59636   if ! test -d $FREETYPE_SRC_PATH; then
59637     { $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
59638 $as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
59639     BUILD_FREETYPE=no
59640   fi
59641   # ..and contain a vc2010 project file
59642   vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
59643   if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
59644     { $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
59645 $as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
59646     BUILD_FREETYPE=no
59647   fi
59648   # Now check if configure found a version of 'msbuild.exe'
59649   if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
59650     { $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
59651 $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;}
59652     BUILD_FREETYPE=no
59653   fi
59654 
59655   # Ready to go..
59656   if test "x$BUILD_FREETYPE" = xyes; then
59657     # msbuild requires trailing slashes for output directories
59658     freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
59659     freetype_lib_path_unix="$freetype_lib_path"
59660     freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
59661 
59662   unix_path="$vcxproj_path"
59663   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59664     windows_path=`$CYGPATH -m "$unix_path"`
59665     vcxproj_path="$windows_path"
59666   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59667     windows_path=`cmd //c echo $unix_path`
59668     vcxproj_path="$windows_path"
59669   fi
59670 
59671 
59672   unix_path="$freetype_lib_path"
59673   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59674     windows_path=`$CYGPATH -m "$unix_path"`
59675     freetype_lib_path="$windows_path"
59676   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59677     windows_path=`cmd //c echo $unix_path`
59678     freetype_lib_path="$windows_path"
59679   fi
59680 
59681 
59682   unix_path="$freetype_obj_path"
59683   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59684     windows_path=`$CYGPATH -m "$unix_path"`
59685     freetype_obj_path="$windows_path"
59686   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59687     windows_path=`cmd //c echo $unix_path`
59688     freetype_obj_path="$windows_path"
59689   fi
59690 
59691     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59692       freetype_platform=x64
59693     else
59694       freetype_platform=win32
59695     fi
59696 
59697     # The original freetype project file is for VS 2010 (i.e. 'v100'),
59698     # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
59699     # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
59700     # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
59701     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
59702 $as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
59703 
59704     # First we try to build the freetype.dll
59705     $ECHO -e "@echo off\n"\
59706         "$MSBUILD $vcxproj_path "\
59707         "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59708         "/p:Configuration=\"Release Multithreaded\" "\
59709         "/p:Platform=$freetype_platform "\
59710         "/p:ConfigurationType=DynamicLibrary "\
59711         "/p:TargetName=freetype "\
59712         "/p:OutDir=\"$freetype_lib_path\" "\
59713         "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
59714     cmd /c freetype.bat
59715 
59716     if test -s "$freetype_lib_path_unix/freetype.dll"; then
59717       # If that succeeds we also build freetype.lib
59718       $ECHO -e "@echo off\n"\
59719           "$MSBUILD $vcxproj_path "\
59720           "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59721           "/p:Configuration=\"Release Multithreaded\" "\
59722           "/p:Platform=$freetype_platform "\
59723           "/p:ConfigurationType=StaticLibrary "\
59724           "/p:TargetName=freetype "\
59725           "/p:OutDir=\"$freetype_lib_path\" "\
59726           "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
59727       cmd /c freetype.bat
59728 
59729       if test -s "$freetype_lib_path_unix/freetype.lib"; then
59730         # Once we build both, lib and dll, set freetype lib and include path appropriately
59731         POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
59732         POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
59733         { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
59734 $as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
59735       else
59736         BUILD_FREETYPE=no
59737       fi
59738     else
59739       BUILD_FREETYPE=no
59740     fi
59741   fi
59742 
59743               if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59744 
59745   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59746   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59747   METHOD="well-known location"
59748 
59749   # Let's start with an optimistic view of the world :-)
59750   FOUND_FREETYPE=yes
59751 
59752   # First look for the canonical freetype main include file ft2build.h.
59753   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59754     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59755     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59756     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59757       # Fail.
59758       FOUND_FREETYPE=no
59759     fi
59760   fi
59761 
59762   if test "x$FOUND_FREETYPE" = xyes; then
59763     # Include file found, let's continue the sanity check.
59764     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59765 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59766 
59767     # Reset to default value
59768     FREETYPE_BASE_NAME=freetype
59769     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59770     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59771       if test "x$OPENJDK_TARGET_OS" = xmacosx \
59772           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59773         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59774         # for the .6 version explicitly.
59775         FREETYPE_BASE_NAME=freetype.6
59776         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59777         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59778 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59779       else
59780         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59781 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59782         FOUND_FREETYPE=no
59783       fi
59784     else
59785       if test "x$OPENJDK_TARGET_OS" = xwindows; then
59786         # On Windows, we will need both .lib and .dll file.
59787         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59788           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59789 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59790           FOUND_FREETYPE=no
59791         fi
59792       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59793           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59794         # Found lib in isa dir, use that instead.
59795         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59796         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59797 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59798       fi
59799     fi
59800   fi
59801 
59802   if test "x$FOUND_FREETYPE" = xyes; then
59803 
59804   # Only process if variable expands to non-empty
59805 
59806   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59807     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59808 
59809   # Input might be given as Windows format, start by converting to
59810   # unix format.
59811   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59812   new_path=`$CYGPATH -u "$path"`
59813 
59814   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59815   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59816   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59817   # "foo.exe" is OK but "foo" is an error.
59818   #
59819   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59820   # It is also a way to make sure we got the proper file name for the real test later on.
59821   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59822   if test "x$test_shortpath" = x; then
59823     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59824 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59825     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59826   fi
59827 
59828   # Call helper function which possibly converts this using DOS-style short mode.
59829   # If so, the updated path is stored in $new_path.
59830 
59831   input_path="$new_path"
59832   # Check if we need to convert this using DOS-style short mode. If the path
59833   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59834   # take no chances and rewrite it.
59835   # Note: m4 eats our [], so we need to use [ and ] instead.
59836   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59837   if test "x$has_forbidden_chars" != x; then
59838     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59839     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59840     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59841     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59842       # Going to short mode and back again did indeed matter. Since short mode is
59843       # case insensitive, let's make it lowercase to improve readability.
59844       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59845       # Now convert it back to Unix-style (cygpath)
59846       input_path=`$CYGPATH -u "$shortmode_path"`
59847       new_path="$input_path"
59848     fi
59849   fi
59850 
59851   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59852   if test "x$test_cygdrive_prefix" = x; then
59853     # As a simple fix, exclude /usr/bin since it's not a real path.
59854     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59855       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59856       # a path prefixed by /cygdrive for fixpath to work.
59857       new_path="$CYGWIN_ROOT_PATH$input_path"
59858     fi
59859   fi
59860 
59861 
59862   if test "x$path" != "x$new_path"; then
59863     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59864     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59865 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59866   fi
59867 
59868     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59869 
59870   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59871   has_colon=`$ECHO $path | $GREP ^.:`
59872   new_path="$path"
59873   if test "x$has_colon" = x; then
59874     # Not in mixed or Windows style, start by that.
59875     new_path=`cmd //c echo $path`
59876   fi
59877 
59878 
59879   input_path="$new_path"
59880   # Check if we need to convert this using DOS-style short mode. If the path
59881   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59882   # take no chances and rewrite it.
59883   # Note: m4 eats our [], so we need to use [ and ] instead.
59884   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59885   if test "x$has_forbidden_chars" != x; then
59886     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59887     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59888   fi
59889 
59890 
59891   windows_path="$new_path"
59892   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59893     unix_path=`$CYGPATH -u "$windows_path"`
59894     new_path="$unix_path"
59895   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59896     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59897     new_path="$unix_path"
59898   fi
59899 
59900   if test "x$path" != "x$new_path"; then
59901     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59902     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59903 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59904   fi
59905 
59906   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59907   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59908 
59909     else
59910       # We're on a unix platform. Hooray! :)
59911       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59912       has_space=`$ECHO "$path" | $GREP " "`
59913       if test "x$has_space" != x; then
59914         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59915 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59916         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59917       fi
59918 
59919       # Use eval to expand a potential ~
59920       eval path="$path"
59921       if test ! -f "$path" && test ! -d "$path"; then
59922         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59923       fi
59924 
59925       if test -d "$path"; then
59926         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59927       else
59928         dir="`$DIRNAME "$path"`"
59929         base="`$BASENAME "$path"`"
59930         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59931       fi
59932     fi
59933   fi
59934 
59935 
59936   # Only process if variable expands to non-empty
59937 
59938   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59939     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59940 
59941   # Input might be given as Windows format, start by converting to
59942   # unix format.
59943   path="$POTENTIAL_FREETYPE_LIB_PATH"
59944   new_path=`$CYGPATH -u "$path"`
59945 
59946   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59947   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59948   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59949   # "foo.exe" is OK but "foo" is an error.
59950   #
59951   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59952   # It is also a way to make sure we got the proper file name for the real test later on.
59953   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59954   if test "x$test_shortpath" = x; then
59955     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59956 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59957     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59958   fi
59959 
59960   # Call helper function which possibly converts this using DOS-style short mode.
59961   # If so, the updated path is stored in $new_path.
59962 
59963   input_path="$new_path"
59964   # Check if we need to convert this using DOS-style short mode. If the path
59965   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59966   # take no chances and rewrite it.
59967   # Note: m4 eats our [], so we need to use [ and ] instead.
59968   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59969   if test "x$has_forbidden_chars" != x; then
59970     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59971     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59972     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59973     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59974       # Going to short mode and back again did indeed matter. Since short mode is
59975       # case insensitive, let's make it lowercase to improve readability.
59976       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59977       # Now convert it back to Unix-style (cygpath)
59978       input_path=`$CYGPATH -u "$shortmode_path"`
59979       new_path="$input_path"
59980     fi
59981   fi
59982 
59983   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59984   if test "x$test_cygdrive_prefix" = x; then
59985     # As a simple fix, exclude /usr/bin since it's not a real path.
59986     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59987       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59988       # a path prefixed by /cygdrive for fixpath to work.
59989       new_path="$CYGWIN_ROOT_PATH$input_path"
59990     fi
59991   fi
59992 
59993 
59994   if test "x$path" != "x$new_path"; then
59995     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59996     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59997 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59998   fi
59999 
60000     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60001 
60002   path="$POTENTIAL_FREETYPE_LIB_PATH"
60003   has_colon=`$ECHO $path | $GREP ^.:`
60004   new_path="$path"
60005   if test "x$has_colon" = x; then
60006     # Not in mixed or Windows style, start by that.
60007     new_path=`cmd //c echo $path`
60008   fi
60009 
60010 
60011   input_path="$new_path"
60012   # Check if we need to convert this using DOS-style short mode. If the path
60013   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60014   # take no chances and rewrite it.
60015   # Note: m4 eats our [], so we need to use [ and ] instead.
60016   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60017   if test "x$has_forbidden_chars" != x; then
60018     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60019     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60020   fi
60021 
60022 
60023   windows_path="$new_path"
60024   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60025     unix_path=`$CYGPATH -u "$windows_path"`
60026     new_path="$unix_path"
60027   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60028     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60029     new_path="$unix_path"
60030   fi
60031 
60032   if test "x$path" != "x$new_path"; then
60033     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60034     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60035 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60036   fi
60037 
60038   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60039   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60040 
60041     else
60042       # We're on a unix platform. Hooray! :)
60043       path="$POTENTIAL_FREETYPE_LIB_PATH"
60044       has_space=`$ECHO "$path" | $GREP " "`
60045       if test "x$has_space" != x; then
60046         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60047 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60048         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60049       fi
60050 
60051       # Use eval to expand a potential ~
60052       eval path="$path"
60053       if test ! -f "$path" && test ! -d "$path"; then
60054         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60055       fi
60056 
60057       if test -d "$path"; then
60058         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60059       else
60060         dir="`$DIRNAME "$path"`"
60061         base="`$BASENAME "$path"`"
60062         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60063       fi
60064     fi
60065   fi
60066 
60067 
60068     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60069     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60070 $as_echo_n "checking for freetype includes... " >&6; }
60071     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60072 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60073     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60074     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60075 $as_echo_n "checking for freetype libraries... " >&6; }
60076     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60077 $as_echo "$FREETYPE_LIB_PATH" >&6; }
60078   fi
60079 
60080               else
60081 
60082   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60083   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
60084   METHOD="well-known location"
60085 
60086   # Let's start with an optimistic view of the world :-)
60087   FOUND_FREETYPE=yes
60088 
60089   # First look for the canonical freetype main include file ft2build.h.
60090   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60091     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60092     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60093     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60094       # Fail.
60095       FOUND_FREETYPE=no
60096     fi
60097   fi
60098 
60099   if test "x$FOUND_FREETYPE" = xyes; then
60100     # Include file found, let's continue the sanity check.
60101     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60102 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60103 
60104     # Reset to default value
60105     FREETYPE_BASE_NAME=freetype
60106     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60107     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60108       if test "x$OPENJDK_TARGET_OS" = xmacosx \
60109           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60110         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60111         # for the .6 version explicitly.
60112         FREETYPE_BASE_NAME=freetype.6
60113         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60114         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60115 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60116       else
60117         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60118 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60119         FOUND_FREETYPE=no
60120       fi
60121     else
60122       if test "x$OPENJDK_TARGET_OS" = xwindows; then
60123         # On Windows, we will need both .lib and .dll file.
60124         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60125           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60126 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60127           FOUND_FREETYPE=no
60128         fi
60129       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60130           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60131         # Found lib in isa dir, use that instead.
60132         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60133         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60134 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60135       fi
60136     fi
60137   fi
60138 
60139   if test "x$FOUND_FREETYPE" = xyes; then
60140 
60141   # Only process if variable expands to non-empty
60142 
60143   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60144     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60145 
60146   # Input might be given as Windows format, start by converting to
60147   # unix format.
60148   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60149   new_path=`$CYGPATH -u "$path"`
60150 
60151   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60152   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60153   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60154   # "foo.exe" is OK but "foo" is an error.
60155   #
60156   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60157   # It is also a way to make sure we got the proper file name for the real test later on.
60158   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60159   if test "x$test_shortpath" = x; then
60160     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60161 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60162     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60163   fi
60164 
60165   # Call helper function which possibly converts this using DOS-style short mode.
60166   # If so, the updated path is stored in $new_path.
60167 
60168   input_path="$new_path"
60169   # Check if we need to convert this using DOS-style short mode. If the path
60170   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60171   # take no chances and rewrite it.
60172   # Note: m4 eats our [], so we need to use [ and ] instead.
60173   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60174   if test "x$has_forbidden_chars" != x; then
60175     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60176     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60177     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60178     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60179       # Going to short mode and back again did indeed matter. Since short mode is
60180       # case insensitive, let's make it lowercase to improve readability.
60181       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60182       # Now convert it back to Unix-style (cygpath)
60183       input_path=`$CYGPATH -u "$shortmode_path"`
60184       new_path="$input_path"
60185     fi
60186   fi
60187 
60188   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60189   if test "x$test_cygdrive_prefix" = x; then
60190     # As a simple fix, exclude /usr/bin since it's not a real path.
60191     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60192       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60193       # a path prefixed by /cygdrive for fixpath to work.
60194       new_path="$CYGWIN_ROOT_PATH$input_path"
60195     fi
60196   fi
60197 
60198 
60199   if test "x$path" != "x$new_path"; then
60200     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60201     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60202 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60203   fi
60204 
60205     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60206 
60207   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60208   has_colon=`$ECHO $path | $GREP ^.:`
60209   new_path="$path"
60210   if test "x$has_colon" = x; then
60211     # Not in mixed or Windows style, start by that.
60212     new_path=`cmd //c echo $path`
60213   fi
60214 
60215 
60216   input_path="$new_path"
60217   # Check if we need to convert this using DOS-style short mode. If the path
60218   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60219   # take no chances and rewrite it.
60220   # Note: m4 eats our [], so we need to use [ and ] instead.
60221   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60222   if test "x$has_forbidden_chars" != x; then
60223     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60224     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60225   fi
60226 
60227 
60228   windows_path="$new_path"
60229   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60230     unix_path=`$CYGPATH -u "$windows_path"`
60231     new_path="$unix_path"
60232   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60233     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60234     new_path="$unix_path"
60235   fi
60236 
60237   if test "x$path" != "x$new_path"; then
60238     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60239     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60240 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60241   fi
60242 
60243   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60244   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60245 
60246     else
60247       # We're on a unix platform. Hooray! :)
60248       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60249       has_space=`$ECHO "$path" | $GREP " "`
60250       if test "x$has_space" != x; then
60251         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60252 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60253         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60254       fi
60255 
60256       # Use eval to expand a potential ~
60257       eval path="$path"
60258       if test ! -f "$path" && test ! -d "$path"; then
60259         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60260       fi
60261 
60262       if test -d "$path"; then
60263         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60264       else
60265         dir="`$DIRNAME "$path"`"
60266         base="`$BASENAME "$path"`"
60267         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60268       fi
60269     fi
60270   fi
60271 
60272 
60273   # Only process if variable expands to non-empty
60274 
60275   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60276     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60277 
60278   # Input might be given as Windows format, start by converting to
60279   # unix format.
60280   path="$POTENTIAL_FREETYPE_LIB_PATH"
60281   new_path=`$CYGPATH -u "$path"`
60282 
60283   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60284   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60285   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60286   # "foo.exe" is OK but "foo" is an error.
60287   #
60288   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60289   # It is also a way to make sure we got the proper file name for the real test later on.
60290   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60291   if test "x$test_shortpath" = x; then
60292     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60293 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60294     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60295   fi
60296 
60297   # Call helper function which possibly converts this using DOS-style short mode.
60298   # If so, the updated path is stored in $new_path.
60299 
60300   input_path="$new_path"
60301   # Check if we need to convert this using DOS-style short mode. If the path
60302   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60303   # take no chances and rewrite it.
60304   # Note: m4 eats our [], so we need to use [ and ] instead.
60305   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60306   if test "x$has_forbidden_chars" != x; then
60307     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60308     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60309     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60310     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60311       # Going to short mode and back again did indeed matter. Since short mode is
60312       # case insensitive, let's make it lowercase to improve readability.
60313       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60314       # Now convert it back to Unix-style (cygpath)
60315       input_path=`$CYGPATH -u "$shortmode_path"`
60316       new_path="$input_path"
60317     fi
60318   fi
60319 
60320   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60321   if test "x$test_cygdrive_prefix" = x; then
60322     # As a simple fix, exclude /usr/bin since it's not a real path.
60323     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60324       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60325       # a path prefixed by /cygdrive for fixpath to work.
60326       new_path="$CYGWIN_ROOT_PATH$input_path"
60327     fi
60328   fi
60329 
60330 
60331   if test "x$path" != "x$new_path"; then
60332     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60333     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60334 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60335   fi
60336 
60337     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60338 
60339   path="$POTENTIAL_FREETYPE_LIB_PATH"
60340   has_colon=`$ECHO $path | $GREP ^.:`
60341   new_path="$path"
60342   if test "x$has_colon" = x; then
60343     # Not in mixed or Windows style, start by that.
60344     new_path=`cmd //c echo $path`
60345   fi
60346 
60347 
60348   input_path="$new_path"
60349   # Check if we need to convert this using DOS-style short mode. If the path
60350   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60351   # take no chances and rewrite it.
60352   # Note: m4 eats our [], so we need to use [ and ] instead.
60353   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60354   if test "x$has_forbidden_chars" != x; then
60355     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60356     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60357   fi
60358 
60359 
60360   windows_path="$new_path"
60361   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60362     unix_path=`$CYGPATH -u "$windows_path"`
60363     new_path="$unix_path"
60364   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60365     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60366     new_path="$unix_path"
60367   fi
60368 
60369   if test "x$path" != "x$new_path"; then
60370     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60371     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60372 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60373   fi
60374 
60375   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60376   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60377 
60378     else
60379       # We're on a unix platform. Hooray! :)
60380       path="$POTENTIAL_FREETYPE_LIB_PATH"
60381       has_space=`$ECHO "$path" | $GREP " "`
60382       if test "x$has_space" != x; then
60383         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60384 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60385         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60386       fi
60387 
60388       # Use eval to expand a potential ~
60389       eval path="$path"
60390       if test ! -f "$path" && test ! -d "$path"; then
60391         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60392       fi
60393 
60394       if test -d "$path"; then
60395         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60396       else
60397         dir="`$DIRNAME "$path"`"
60398         base="`$BASENAME "$path"`"
60399         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60400       fi
60401     fi
60402   fi
60403 
60404 
60405     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60406     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60407 $as_echo_n "checking for freetype includes... " >&6; }
60408     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60409 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60410     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60411     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60412 $as_echo_n "checking for freetype libraries... " >&6; }
60413     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60414 $as_echo "$FREETYPE_LIB_PATH" >&6; }
60415   fi
60416 
60417               fi
60418             fi
60419           fi
60420         else
60421           FREETYPE_BASE_DIR="$SYSROOT/usr"
60422 
60423   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60424   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60425   METHOD="well-known location"
60426 
60427   # Let's start with an optimistic view of the world :-)
60428   FOUND_FREETYPE=yes
60429 
60430   # First look for the canonical freetype main include file ft2build.h.
60431   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60432     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60433     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60434     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60435       # Fail.
60436       FOUND_FREETYPE=no
60437     fi
60438   fi
60439 
60440   if test "x$FOUND_FREETYPE" = xyes; then
60441     # Include file found, let's continue the sanity check.
60442     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60443 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60444 
60445     # Reset to default value
60446     FREETYPE_BASE_NAME=freetype
60447     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60448     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60449       if test "x$OPENJDK_TARGET_OS" = xmacosx \
60450           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60451         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60452         # for the .6 version explicitly.
60453         FREETYPE_BASE_NAME=freetype.6
60454         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60455         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60456 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60457       else
60458         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60459 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60460         FOUND_FREETYPE=no
60461       fi
60462     else
60463       if test "x$OPENJDK_TARGET_OS" = xwindows; then
60464         # On Windows, we will need both .lib and .dll file.
60465         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60466           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60467 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60468           FOUND_FREETYPE=no
60469         fi
60470       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60471           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60472         # Found lib in isa dir, use that instead.
60473         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60474         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60475 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60476       fi
60477     fi
60478   fi
60479 
60480   if test "x$FOUND_FREETYPE" = xyes; then
60481 
60482   # Only process if variable expands to non-empty
60483 
60484   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60485     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60486 
60487   # Input might be given as Windows format, start by converting to
60488   # unix format.
60489   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60490   new_path=`$CYGPATH -u "$path"`
60491 
60492   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60493   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60494   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60495   # "foo.exe" is OK but "foo" is an error.
60496   #
60497   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60498   # It is also a way to make sure we got the proper file name for the real test later on.
60499   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60500   if test "x$test_shortpath" = x; then
60501     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60502 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60503     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60504   fi
60505 
60506   # Call helper function which possibly converts this using DOS-style short mode.
60507   # If so, the updated path is stored in $new_path.
60508 
60509   input_path="$new_path"
60510   # Check if we need to convert this using DOS-style short mode. If the path
60511   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60512   # take no chances and rewrite it.
60513   # Note: m4 eats our [], so we need to use [ and ] instead.
60514   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60515   if test "x$has_forbidden_chars" != x; then
60516     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60517     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60518     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60519     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60520       # Going to short mode and back again did indeed matter. Since short mode is
60521       # case insensitive, let's make it lowercase to improve readability.
60522       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60523       # Now convert it back to Unix-style (cygpath)
60524       input_path=`$CYGPATH -u "$shortmode_path"`
60525       new_path="$input_path"
60526     fi
60527   fi
60528 
60529   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60530   if test "x$test_cygdrive_prefix" = x; then
60531     # As a simple fix, exclude /usr/bin since it's not a real path.
60532     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60533       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60534       # a path prefixed by /cygdrive for fixpath to work.
60535       new_path="$CYGWIN_ROOT_PATH$input_path"
60536     fi
60537   fi
60538 
60539 
60540   if test "x$path" != "x$new_path"; then
60541     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60542     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60543 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60544   fi
60545 
60546     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60547 
60548   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60549   has_colon=`$ECHO $path | $GREP ^.:`
60550   new_path="$path"
60551   if test "x$has_colon" = x; then
60552     # Not in mixed or Windows style, start by that.
60553     new_path=`cmd //c echo $path`
60554   fi
60555 
60556 
60557   input_path="$new_path"
60558   # Check if we need to convert this using DOS-style short mode. If the path
60559   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60560   # take no chances and rewrite it.
60561   # Note: m4 eats our [], so we need to use [ and ] instead.
60562   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60563   if test "x$has_forbidden_chars" != x; then
60564     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60565     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60566   fi
60567 
60568 
60569   windows_path="$new_path"
60570   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60571     unix_path=`$CYGPATH -u "$windows_path"`
60572     new_path="$unix_path"
60573   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60574     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60575     new_path="$unix_path"
60576   fi
60577 
60578   if test "x$path" != "x$new_path"; then
60579     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60580     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60581 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60582   fi
60583 
60584   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60585   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60586 
60587     else
60588       # We're on a unix platform. Hooray! :)
60589       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60590       has_space=`$ECHO "$path" | $GREP " "`
60591       if test "x$has_space" != x; then
60592         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60593 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60594         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60595       fi
60596 
60597       # Use eval to expand a potential ~
60598       eval path="$path"
60599       if test ! -f "$path" && test ! -d "$path"; then
60600         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60601       fi
60602 
60603       if test -d "$path"; then
60604         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60605       else
60606         dir="`$DIRNAME "$path"`"
60607         base="`$BASENAME "$path"`"
60608         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60609       fi
60610     fi
60611   fi
60612 
60613 
60614   # Only process if variable expands to non-empty
60615 
60616   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60617     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60618 
60619   # Input might be given as Windows format, start by converting to
60620   # unix format.
60621   path="$POTENTIAL_FREETYPE_LIB_PATH"
60622   new_path=`$CYGPATH -u "$path"`
60623 
60624   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60625   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60626   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60627   # "foo.exe" is OK but "foo" is an error.
60628   #
60629   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60630   # It is also a way to make sure we got the proper file name for the real test later on.
60631   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60632   if test "x$test_shortpath" = x; then
60633     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60634 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60635     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60636   fi
60637 
60638   # Call helper function which possibly converts this using DOS-style short mode.
60639   # If so, the updated path is stored in $new_path.
60640 
60641   input_path="$new_path"
60642   # Check if we need to convert this using DOS-style short mode. If the path
60643   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60644   # take no chances and rewrite it.
60645   # Note: m4 eats our [], so we need to use [ and ] instead.
60646   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60647   if test "x$has_forbidden_chars" != x; then
60648     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60649     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60650     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60651     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60652       # Going to short mode and back again did indeed matter. Since short mode is
60653       # case insensitive, let's make it lowercase to improve readability.
60654       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60655       # Now convert it back to Unix-style (cygpath)
60656       input_path=`$CYGPATH -u "$shortmode_path"`
60657       new_path="$input_path"
60658     fi
60659   fi
60660 
60661   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60662   if test "x$test_cygdrive_prefix" = x; then
60663     # As a simple fix, exclude /usr/bin since it's not a real path.
60664     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60665       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60666       # a path prefixed by /cygdrive for fixpath to work.
60667       new_path="$CYGWIN_ROOT_PATH$input_path"
60668     fi
60669   fi
60670 
60671 
60672   if test "x$path" != "x$new_path"; then
60673     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60674     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60675 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60676   fi
60677 
60678     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60679 
60680   path="$POTENTIAL_FREETYPE_LIB_PATH"
60681   has_colon=`$ECHO $path | $GREP ^.:`
60682   new_path="$path"
60683   if test "x$has_colon" = x; then
60684     # Not in mixed or Windows style, start by that.
60685     new_path=`cmd //c echo $path`
60686   fi
60687 
60688 
60689   input_path="$new_path"
60690   # Check if we need to convert this using DOS-style short mode. If the path
60691   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60692   # take no chances and rewrite it.
60693   # Note: m4 eats our [], so we need to use [ and ] instead.
60694   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60695   if test "x$has_forbidden_chars" != x; then
60696     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60697     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60698   fi
60699 
60700 
60701   windows_path="$new_path"
60702   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60703     unix_path=`$CYGPATH -u "$windows_path"`
60704     new_path="$unix_path"
60705   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60706     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60707     new_path="$unix_path"
60708   fi
60709 
60710   if test "x$path" != "x$new_path"; then
60711     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60712     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60713 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60714   fi
60715 
60716   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60717   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60718 
60719     else
60720       # We're on a unix platform. Hooray! :)
60721       path="$POTENTIAL_FREETYPE_LIB_PATH"
60722       has_space=`$ECHO "$path" | $GREP " "`
60723       if test "x$has_space" != x; then
60724         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60725 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60726         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60727       fi
60728 
60729       # Use eval to expand a potential ~
60730       eval path="$path"
60731       if test ! -f "$path" && test ! -d "$path"; then
60732         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60733       fi
60734 
60735       if test -d "$path"; then
60736         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60737       else
60738         dir="`$DIRNAME "$path"`"
60739         base="`$BASENAME "$path"`"
60740         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60741       fi
60742     fi
60743   fi
60744 
60745 
60746     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60747     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60748 $as_echo_n "checking for freetype includes... " >&6; }
60749     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60750 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60751     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60752     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60753 $as_echo_n "checking for freetype libraries... " >&6; }
60754     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60755 $as_echo "$FREETYPE_LIB_PATH" >&6; }
60756   fi
60757 
60758 
60759           if test "x$FOUND_FREETYPE" != xyes; then
60760             FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
60761 
60762   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60763   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60764   METHOD="well-known location"
60765 
60766   # Let's start with an optimistic view of the world :-)
60767   FOUND_FREETYPE=yes
60768 
60769   # First look for the canonical freetype main include file ft2build.h.
60770   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60771     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60772     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60773     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60774       # Fail.
60775       FOUND_FREETYPE=no
60776     fi
60777   fi
60778 
60779   if test "x$FOUND_FREETYPE" = xyes; then
60780     # Include file found, let's continue the sanity check.
60781     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60782 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60783 
60784     # Reset to default value
60785     FREETYPE_BASE_NAME=freetype
60786     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60787     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60788       if test "x$OPENJDK_TARGET_OS" = xmacosx \
60789           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60790         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60791         # for the .6 version explicitly.
60792         FREETYPE_BASE_NAME=freetype.6
60793         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60794         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60795 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60796       else
60797         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60798 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60799         FOUND_FREETYPE=no
60800       fi
60801     else
60802       if test "x$OPENJDK_TARGET_OS" = xwindows; then
60803         # On Windows, we will need both .lib and .dll file.
60804         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60805           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60806 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60807           FOUND_FREETYPE=no
60808         fi
60809       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60810           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60811         # Found lib in isa dir, use that instead.
60812         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60813         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60814 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60815       fi
60816     fi
60817   fi
60818 
60819   if test "x$FOUND_FREETYPE" = xyes; then
60820 
60821   # Only process if variable expands to non-empty
60822 
60823   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60824     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60825 
60826   # Input might be given as Windows format, start by converting to
60827   # unix format.
60828   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60829   new_path=`$CYGPATH -u "$path"`
60830 
60831   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60832   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60833   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60834   # "foo.exe" is OK but "foo" is an error.
60835   #
60836   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60837   # It is also a way to make sure we got the proper file name for the real test later on.
60838   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60839   if test "x$test_shortpath" = x; then
60840     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60841 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60842     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60843   fi
60844 
60845   # Call helper function which possibly converts this using DOS-style short mode.
60846   # If so, the updated path is stored in $new_path.
60847 
60848   input_path="$new_path"
60849   # Check if we need to convert this using DOS-style short mode. If the path
60850   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60851   # take no chances and rewrite it.
60852   # Note: m4 eats our [], so we need to use [ and ] instead.
60853   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60854   if test "x$has_forbidden_chars" != x; then
60855     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60856     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60857     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60858     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60859       # Going to short mode and back again did indeed matter. Since short mode is
60860       # case insensitive, let's make it lowercase to improve readability.
60861       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60862       # Now convert it back to Unix-style (cygpath)
60863       input_path=`$CYGPATH -u "$shortmode_path"`
60864       new_path="$input_path"
60865     fi
60866   fi
60867 
60868   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60869   if test "x$test_cygdrive_prefix" = x; then
60870     # As a simple fix, exclude /usr/bin since it's not a real path.
60871     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60872       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60873       # a path prefixed by /cygdrive for fixpath to work.
60874       new_path="$CYGWIN_ROOT_PATH$input_path"
60875     fi
60876   fi
60877 
60878 
60879   if test "x$path" != "x$new_path"; then
60880     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60881     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60882 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60883   fi
60884 
60885     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60886 
60887   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60888   has_colon=`$ECHO $path | $GREP ^.:`
60889   new_path="$path"
60890   if test "x$has_colon" = x; then
60891     # Not in mixed or Windows style, start by that.
60892     new_path=`cmd //c echo $path`
60893   fi
60894 
60895 
60896   input_path="$new_path"
60897   # Check if we need to convert this using DOS-style short mode. If the path
60898   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60899   # take no chances and rewrite it.
60900   # Note: m4 eats our [], so we need to use [ and ] instead.
60901   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60902   if test "x$has_forbidden_chars" != x; then
60903     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60904     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60905   fi
60906 
60907 
60908   windows_path="$new_path"
60909   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60910     unix_path=`$CYGPATH -u "$windows_path"`
60911     new_path="$unix_path"
60912   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60913     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60914     new_path="$unix_path"
60915   fi
60916 
60917   if test "x$path" != "x$new_path"; then
60918     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60919     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60920 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60921   fi
60922 
60923   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60924   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60925 
60926     else
60927       # We're on a unix platform. Hooray! :)
60928       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60929       has_space=`$ECHO "$path" | $GREP " "`
60930       if test "x$has_space" != x; then
60931         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60932 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60933         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60934       fi
60935 
60936       # Use eval to expand a potential ~
60937       eval path="$path"
60938       if test ! -f "$path" && test ! -d "$path"; then
60939         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60940       fi
60941 
60942       if test -d "$path"; then
60943         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60944       else
60945         dir="`$DIRNAME "$path"`"
60946         base="`$BASENAME "$path"`"
60947         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60948       fi
60949     fi
60950   fi
60951 
60952 
60953   # Only process if variable expands to non-empty
60954 
60955   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60956     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60957 
60958   # Input might be given as Windows format, start by converting to
60959   # unix format.
60960   path="$POTENTIAL_FREETYPE_LIB_PATH"
60961   new_path=`$CYGPATH -u "$path"`
60962 
60963   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60964   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60965   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60966   # "foo.exe" is OK but "foo" is an error.
60967   #
60968   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60969   # It is also a way to make sure we got the proper file name for the real test later on.
60970   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60971   if test "x$test_shortpath" = x; then
60972     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60973 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60974     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60975   fi
60976 
60977   # Call helper function which possibly converts this using DOS-style short mode.
60978   # If so, the updated path is stored in $new_path.
60979 
60980   input_path="$new_path"
60981   # Check if we need to convert this using DOS-style short mode. If the path
60982   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60983   # take no chances and rewrite it.
60984   # Note: m4 eats our [], so we need to use [ and ] instead.
60985   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60986   if test "x$has_forbidden_chars" != x; then
60987     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60988     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60989     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60990     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60991       # Going to short mode and back again did indeed matter. Since short mode is
60992       # case insensitive, let's make it lowercase to improve readability.
60993       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60994       # Now convert it back to Unix-style (cygpath)
60995       input_path=`$CYGPATH -u "$shortmode_path"`
60996       new_path="$input_path"
60997     fi
60998   fi
60999 
61000   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61001   if test "x$test_cygdrive_prefix" = x; then
61002     # As a simple fix, exclude /usr/bin since it's not a real path.
61003     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61004       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61005       # a path prefixed by /cygdrive for fixpath to work.
61006       new_path="$CYGWIN_ROOT_PATH$input_path"
61007     fi
61008   fi
61009 
61010 
61011   if test "x$path" != "x$new_path"; then
61012     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61013     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61014 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61015   fi
61016 
61017     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61018 
61019   path="$POTENTIAL_FREETYPE_LIB_PATH"
61020   has_colon=`$ECHO $path | $GREP ^.:`
61021   new_path="$path"
61022   if test "x$has_colon" = x; then
61023     # Not in mixed or Windows style, start by that.
61024     new_path=`cmd //c echo $path`
61025   fi
61026 
61027 
61028   input_path="$new_path"
61029   # Check if we need to convert this using DOS-style short mode. If the path
61030   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61031   # take no chances and rewrite it.
61032   # Note: m4 eats our [], so we need to use [ and ] instead.
61033   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61034   if test "x$has_forbidden_chars" != x; then
61035     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61036     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61037   fi
61038 
61039 
61040   windows_path="$new_path"
61041   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61042     unix_path=`$CYGPATH -u "$windows_path"`
61043     new_path="$unix_path"
61044   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61045     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61046     new_path="$unix_path"
61047   fi
61048 
61049   if test "x$path" != "x$new_path"; then
61050     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61051     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61052 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61053   fi
61054 
61055   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61056   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61057 
61058     else
61059       # We're on a unix platform. Hooray! :)
61060       path="$POTENTIAL_FREETYPE_LIB_PATH"
61061       has_space=`$ECHO "$path" | $GREP " "`
61062       if test "x$has_space" != x; then
61063         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61064 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61065         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61066       fi
61067 
61068       # Use eval to expand a potential ~
61069       eval path="$path"
61070       if test ! -f "$path" && test ! -d "$path"; then
61071         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61072       fi
61073 
61074       if test -d "$path"; then
61075         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61076       else
61077         dir="`$DIRNAME "$path"`"
61078         base="`$BASENAME "$path"`"
61079         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61080       fi
61081     fi
61082   fi
61083 
61084 
61085     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61086     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61087 $as_echo_n "checking for freetype includes... " >&6; }
61088     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61089 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61090     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61091     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61092 $as_echo_n "checking for freetype libraries... " >&6; }
61093     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61094 $as_echo "$FREETYPE_LIB_PATH" >&6; }
61095   fi
61096 
61097           fi
61098           if test "x$FOUND_FREETYPE" != xyes; then
61099             FREETYPE_BASE_DIR="$SYSROOT/usr/local"
61100 
61101   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61102   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61103   METHOD="well-known location"
61104 
61105   # Let's start with an optimistic view of the world :-)
61106   FOUND_FREETYPE=yes
61107 
61108   # First look for the canonical freetype main include file ft2build.h.
61109   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61110     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61111     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61112     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61113       # Fail.
61114       FOUND_FREETYPE=no
61115     fi
61116   fi
61117 
61118   if test "x$FOUND_FREETYPE" = xyes; then
61119     # Include file found, let's continue the sanity check.
61120     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61121 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61122 
61123     # Reset to default value
61124     FREETYPE_BASE_NAME=freetype
61125     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61126     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61127       if test "x$OPENJDK_TARGET_OS" = xmacosx \
61128           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61129         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61130         # for the .6 version explicitly.
61131         FREETYPE_BASE_NAME=freetype.6
61132         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61133         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61134 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61135       else
61136         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61137 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61138         FOUND_FREETYPE=no
61139       fi
61140     else
61141       if test "x$OPENJDK_TARGET_OS" = xwindows; then
61142         # On Windows, we will need both .lib and .dll file.
61143         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61144           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61145 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61146           FOUND_FREETYPE=no
61147         fi
61148       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61149           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61150         # Found lib in isa dir, use that instead.
61151         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61152         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61153 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61154       fi
61155     fi
61156   fi
61157 
61158   if test "x$FOUND_FREETYPE" = xyes; then
61159 
61160   # Only process if variable expands to non-empty
61161 
61162   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61163     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61164 
61165   # Input might be given as Windows format, start by converting to
61166   # unix format.
61167   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61168   new_path=`$CYGPATH -u "$path"`
61169 
61170   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61171   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61172   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61173   # "foo.exe" is OK but "foo" is an error.
61174   #
61175   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61176   # It is also a way to make sure we got the proper file name for the real test later on.
61177   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61178   if test "x$test_shortpath" = x; then
61179     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61180 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61181     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61182   fi
61183 
61184   # Call helper function which possibly converts this using DOS-style short mode.
61185   # If so, the updated path is stored in $new_path.
61186 
61187   input_path="$new_path"
61188   # Check if we need to convert this using DOS-style short mode. If the path
61189   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61190   # take no chances and rewrite it.
61191   # Note: m4 eats our [], so we need to use [ and ] instead.
61192   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61193   if test "x$has_forbidden_chars" != x; then
61194     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61195     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61196     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61197     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61198       # Going to short mode and back again did indeed matter. Since short mode is
61199       # case insensitive, let's make it lowercase to improve readability.
61200       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61201       # Now convert it back to Unix-style (cygpath)
61202       input_path=`$CYGPATH -u "$shortmode_path"`
61203       new_path="$input_path"
61204     fi
61205   fi
61206 
61207   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61208   if test "x$test_cygdrive_prefix" = x; then
61209     # As a simple fix, exclude /usr/bin since it's not a real path.
61210     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61211       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61212       # a path prefixed by /cygdrive for fixpath to work.
61213       new_path="$CYGWIN_ROOT_PATH$input_path"
61214     fi
61215   fi
61216 
61217 
61218   if test "x$path" != "x$new_path"; then
61219     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61220     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61221 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61222   fi
61223 
61224     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61225 
61226   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61227   has_colon=`$ECHO $path | $GREP ^.:`
61228   new_path="$path"
61229   if test "x$has_colon" = x; then
61230     # Not in mixed or Windows style, start by that.
61231     new_path=`cmd //c echo $path`
61232   fi
61233 
61234 
61235   input_path="$new_path"
61236   # Check if we need to convert this using DOS-style short mode. If the path
61237   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61238   # take no chances and rewrite it.
61239   # Note: m4 eats our [], so we need to use [ and ] instead.
61240   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61241   if test "x$has_forbidden_chars" != x; then
61242     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61243     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61244   fi
61245 
61246 
61247   windows_path="$new_path"
61248   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61249     unix_path=`$CYGPATH -u "$windows_path"`
61250     new_path="$unix_path"
61251   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61252     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61253     new_path="$unix_path"
61254   fi
61255 
61256   if test "x$path" != "x$new_path"; then
61257     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61258     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61259 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61260   fi
61261 
61262   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61263   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61264 
61265     else
61266       # We're on a unix platform. Hooray! :)
61267       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61268       has_space=`$ECHO "$path" | $GREP " "`
61269       if test "x$has_space" != x; then
61270         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61271 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61272         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61273       fi
61274 
61275       # Use eval to expand a potential ~
61276       eval path="$path"
61277       if test ! -f "$path" && test ! -d "$path"; then
61278         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61279       fi
61280 
61281       if test -d "$path"; then
61282         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61283       else
61284         dir="`$DIRNAME "$path"`"
61285         base="`$BASENAME "$path"`"
61286         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61287       fi
61288     fi
61289   fi
61290 
61291 
61292   # Only process if variable expands to non-empty
61293 
61294   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61295     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61296 
61297   # Input might be given as Windows format, start by converting to
61298   # unix format.
61299   path="$POTENTIAL_FREETYPE_LIB_PATH"
61300   new_path=`$CYGPATH -u "$path"`
61301 
61302   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61303   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61304   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61305   # "foo.exe" is OK but "foo" is an error.
61306   #
61307   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61308   # It is also a way to make sure we got the proper file name for the real test later on.
61309   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61310   if test "x$test_shortpath" = x; then
61311     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61312 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61313     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61314   fi
61315 
61316   # Call helper function which possibly converts this using DOS-style short mode.
61317   # If so, the updated path is stored in $new_path.
61318 
61319   input_path="$new_path"
61320   # Check if we need to convert this using DOS-style short mode. If the path
61321   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61322   # take no chances and rewrite it.
61323   # Note: m4 eats our [], so we need to use [ and ] instead.
61324   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61325   if test "x$has_forbidden_chars" != x; then
61326     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61327     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61328     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61329     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61330       # Going to short mode and back again did indeed matter. Since short mode is
61331       # case insensitive, let's make it lowercase to improve readability.
61332       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61333       # Now convert it back to Unix-style (cygpath)
61334       input_path=`$CYGPATH -u "$shortmode_path"`
61335       new_path="$input_path"
61336     fi
61337   fi
61338 
61339   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61340   if test "x$test_cygdrive_prefix" = x; then
61341     # As a simple fix, exclude /usr/bin since it's not a real path.
61342     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61343       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61344       # a path prefixed by /cygdrive for fixpath to work.
61345       new_path="$CYGWIN_ROOT_PATH$input_path"
61346     fi
61347   fi
61348 
61349 
61350   if test "x$path" != "x$new_path"; then
61351     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61352     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61353 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61354   fi
61355 
61356     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61357 
61358   path="$POTENTIAL_FREETYPE_LIB_PATH"
61359   has_colon=`$ECHO $path | $GREP ^.:`
61360   new_path="$path"
61361   if test "x$has_colon" = x; then
61362     # Not in mixed or Windows style, start by that.
61363     new_path=`cmd //c echo $path`
61364   fi
61365 
61366 
61367   input_path="$new_path"
61368   # Check if we need to convert this using DOS-style short mode. If the path
61369   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61370   # take no chances and rewrite it.
61371   # Note: m4 eats our [], so we need to use [ and ] instead.
61372   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61373   if test "x$has_forbidden_chars" != x; then
61374     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61375     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61376   fi
61377 
61378 
61379   windows_path="$new_path"
61380   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61381     unix_path=`$CYGPATH -u "$windows_path"`
61382     new_path="$unix_path"
61383   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61384     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61385     new_path="$unix_path"
61386   fi
61387 
61388   if test "x$path" != "x$new_path"; then
61389     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61390     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61391 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61392   fi
61393 
61394   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61395   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61396 
61397     else
61398       # We're on a unix platform. Hooray! :)
61399       path="$POTENTIAL_FREETYPE_LIB_PATH"
61400       has_space=`$ECHO "$path" | $GREP " "`
61401       if test "x$has_space" != x; then
61402         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61403 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61404         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61405       fi
61406 
61407       # Use eval to expand a potential ~
61408       eval path="$path"
61409       if test ! -f "$path" && test ! -d "$path"; then
61410         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61411       fi
61412 
61413       if test -d "$path"; then
61414         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61415       else
61416         dir="`$DIRNAME "$path"`"
61417         base="`$BASENAME "$path"`"
61418         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61419       fi
61420     fi
61421   fi
61422 
61423 
61424     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61425     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61426 $as_echo_n "checking for freetype includes... " >&6; }
61427     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61428 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61429     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61430     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61431 $as_echo_n "checking for freetype libraries... " >&6; }
61432     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61433 $as_echo "$FREETYPE_LIB_PATH" >&6; }
61434   fi
61435 
61436           fi
61437 
61438           if test "x$OPENJDK_TARGET_OS" = xmacosx; then
61439             if test "x$FOUND_FREETYPE" != xyes; then
61440               # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
61441               FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
61442 
61443   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61444   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61445   METHOD="well-known location"
61446 
61447   # Let's start with an optimistic view of the world :-)
61448   FOUND_FREETYPE=yes
61449 
61450   # First look for the canonical freetype main include file ft2build.h.
61451   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61452     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61453     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61454     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61455       # Fail.
61456       FOUND_FREETYPE=no
61457     fi
61458   fi
61459 
61460   if test "x$FOUND_FREETYPE" = xyes; then
61461     # Include file found, let's continue the sanity check.
61462     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61463 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61464 
61465     # Reset to default value
61466     FREETYPE_BASE_NAME=freetype
61467     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61468     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61469       if test "x$OPENJDK_TARGET_OS" = xmacosx \
61470           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61471         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61472         # for the .6 version explicitly.
61473         FREETYPE_BASE_NAME=freetype.6
61474         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61475         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61476 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61477       else
61478         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61479 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61480         FOUND_FREETYPE=no
61481       fi
61482     else
61483       if test "x$OPENJDK_TARGET_OS" = xwindows; then
61484         # On Windows, we will need both .lib and .dll file.
61485         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61486           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61487 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61488           FOUND_FREETYPE=no
61489         fi
61490       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61491           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61492         # Found lib in isa dir, use that instead.
61493         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61494         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61495 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61496       fi
61497     fi
61498   fi
61499 
61500   if test "x$FOUND_FREETYPE" = xyes; then
61501 
61502   # Only process if variable expands to non-empty
61503 
61504   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61505     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61506 
61507   # Input might be given as Windows format, start by converting to
61508   # unix format.
61509   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61510   new_path=`$CYGPATH -u "$path"`
61511 
61512   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61513   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61514   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61515   # "foo.exe" is OK but "foo" is an error.
61516   #
61517   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61518   # It is also a way to make sure we got the proper file name for the real test later on.
61519   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61520   if test "x$test_shortpath" = x; then
61521     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61522 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61523     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61524   fi
61525 
61526   # Call helper function which possibly converts this using DOS-style short mode.
61527   # If so, the updated path is stored in $new_path.
61528 
61529   input_path="$new_path"
61530   # Check if we need to convert this using DOS-style short mode. If the path
61531   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61532   # take no chances and rewrite it.
61533   # Note: m4 eats our [], so we need to use [ and ] instead.
61534   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61535   if test "x$has_forbidden_chars" != x; then
61536     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61537     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61538     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61539     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61540       # Going to short mode and back again did indeed matter. Since short mode is
61541       # case insensitive, let's make it lowercase to improve readability.
61542       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61543       # Now convert it back to Unix-style (cygpath)
61544       input_path=`$CYGPATH -u "$shortmode_path"`
61545       new_path="$input_path"
61546     fi
61547   fi
61548 
61549   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61550   if test "x$test_cygdrive_prefix" = x; then
61551     # As a simple fix, exclude /usr/bin since it's not a real path.
61552     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61553       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61554       # a path prefixed by /cygdrive for fixpath to work.
61555       new_path="$CYGWIN_ROOT_PATH$input_path"
61556     fi
61557   fi
61558 
61559 
61560   if test "x$path" != "x$new_path"; then
61561     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61562     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61563 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61564   fi
61565 
61566     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61567 
61568   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61569   has_colon=`$ECHO $path | $GREP ^.:`
61570   new_path="$path"
61571   if test "x$has_colon" = x; then
61572     # Not in mixed or Windows style, start by that.
61573     new_path=`cmd //c echo $path`
61574   fi
61575 
61576 
61577   input_path="$new_path"
61578   # Check if we need to convert this using DOS-style short mode. If the path
61579   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61580   # take no chances and rewrite it.
61581   # Note: m4 eats our [], so we need to use [ and ] instead.
61582   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61583   if test "x$has_forbidden_chars" != x; then
61584     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61585     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61586   fi
61587 
61588 
61589   windows_path="$new_path"
61590   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61591     unix_path=`$CYGPATH -u "$windows_path"`
61592     new_path="$unix_path"
61593   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61594     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61595     new_path="$unix_path"
61596   fi
61597 
61598   if test "x$path" != "x$new_path"; then
61599     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61600     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61601 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61602   fi
61603 
61604   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61605   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61606 
61607     else
61608       # We're on a unix platform. Hooray! :)
61609       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61610       has_space=`$ECHO "$path" | $GREP " "`
61611       if test "x$has_space" != x; then
61612         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61613 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61614         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61615       fi
61616 
61617       # Use eval to expand a potential ~
61618       eval path="$path"
61619       if test ! -f "$path" && test ! -d "$path"; then
61620         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61621       fi
61622 
61623       if test -d "$path"; then
61624         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61625       else
61626         dir="`$DIRNAME "$path"`"
61627         base="`$BASENAME "$path"`"
61628         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61629       fi
61630     fi
61631   fi
61632 
61633 
61634   # Only process if variable expands to non-empty
61635 
61636   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61637     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61638 
61639   # Input might be given as Windows format, start by converting to
61640   # unix format.
61641   path="$POTENTIAL_FREETYPE_LIB_PATH"
61642   new_path=`$CYGPATH -u "$path"`
61643 
61644   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61645   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61646   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61647   # "foo.exe" is OK but "foo" is an error.
61648   #
61649   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61650   # It is also a way to make sure we got the proper file name for the real test later on.
61651   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61652   if test "x$test_shortpath" = x; then
61653     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61654 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61655     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61656   fi
61657 
61658   # Call helper function which possibly converts this using DOS-style short mode.
61659   # If so, the updated path is stored in $new_path.
61660 
61661   input_path="$new_path"
61662   # Check if we need to convert this using DOS-style short mode. If the path
61663   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61664   # take no chances and rewrite it.
61665   # Note: m4 eats our [], so we need to use [ and ] instead.
61666   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61667   if test "x$has_forbidden_chars" != x; then
61668     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61669     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61670     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61671     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61672       # Going to short mode and back again did indeed matter. Since short mode is
61673       # case insensitive, let's make it lowercase to improve readability.
61674       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61675       # Now convert it back to Unix-style (cygpath)
61676       input_path=`$CYGPATH -u "$shortmode_path"`
61677       new_path="$input_path"
61678     fi
61679   fi
61680 
61681   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61682   if test "x$test_cygdrive_prefix" = x; then
61683     # As a simple fix, exclude /usr/bin since it's not a real path.
61684     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61685       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61686       # a path prefixed by /cygdrive for fixpath to work.
61687       new_path="$CYGWIN_ROOT_PATH$input_path"
61688     fi
61689   fi
61690 
61691 
61692   if test "x$path" != "x$new_path"; then
61693     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61694     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61695 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61696   fi
61697 
61698     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61699 
61700   path="$POTENTIAL_FREETYPE_LIB_PATH"
61701   has_colon=`$ECHO $path | $GREP ^.:`
61702   new_path="$path"
61703   if test "x$has_colon" = x; then
61704     # Not in mixed or Windows style, start by that.
61705     new_path=`cmd //c echo $path`
61706   fi
61707 
61708 
61709   input_path="$new_path"
61710   # Check if we need to convert this using DOS-style short mode. If the path
61711   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61712   # take no chances and rewrite it.
61713   # Note: m4 eats our [], so we need to use [ and ] instead.
61714   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61715   if test "x$has_forbidden_chars" != x; then
61716     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61717     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61718   fi
61719 
61720 
61721   windows_path="$new_path"
61722   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61723     unix_path=`$CYGPATH -u "$windows_path"`
61724     new_path="$unix_path"
61725   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61726     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61727     new_path="$unix_path"
61728   fi
61729 
61730   if test "x$path" != "x$new_path"; then
61731     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61732     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61733 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61734   fi
61735 
61736   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61737   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61738 
61739     else
61740       # We're on a unix platform. Hooray! :)
61741       path="$POTENTIAL_FREETYPE_LIB_PATH"
61742       has_space=`$ECHO "$path" | $GREP " "`
61743       if test "x$has_space" != x; then
61744         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61745 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61746         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61747       fi
61748 
61749       # Use eval to expand a potential ~
61750       eval path="$path"
61751       if test ! -f "$path" && test ! -d "$path"; then
61752         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61753       fi
61754 
61755       if test -d "$path"; then
61756         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61757       else
61758         dir="`$DIRNAME "$path"`"
61759         base="`$BASENAME "$path"`"
61760         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61761       fi
61762     fi
61763   fi
61764 
61765 
61766     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61767     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61768 $as_echo_n "checking for freetype includes... " >&6; }
61769     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61770 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61771     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61772     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61773 $as_echo_n "checking for freetype libraries... " >&6; }
61774     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61775 $as_echo "$FREETYPE_LIB_PATH" >&6; }
61776   fi
61777 
61778             fi
61779           fi
61780 
61781           if test "x$FOUND_FREETYPE" != xyes; then
61782             FREETYPE_BASE_DIR="$SYSROOT/usr"
61783             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
61784 
61785   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61786   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
61787   METHOD="well-known location"
61788 
61789   # Let's start with an optimistic view of the world :-)
61790   FOUND_FREETYPE=yes
61791 
61792   # First look for the canonical freetype main include file ft2build.h.
61793   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61794     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61795     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61796     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61797       # Fail.
61798       FOUND_FREETYPE=no
61799     fi
61800   fi
61801 
61802   if test "x$FOUND_FREETYPE" = xyes; then
61803     # Include file found, let's continue the sanity check.
61804     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61805 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61806 
61807     # Reset to default value
61808     FREETYPE_BASE_NAME=freetype
61809     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61810     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61811       if test "x$OPENJDK_TARGET_OS" = xmacosx \
61812           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61813         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61814         # for the .6 version explicitly.
61815         FREETYPE_BASE_NAME=freetype.6
61816         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61817         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61818 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61819       else
61820         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61821 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61822         FOUND_FREETYPE=no
61823       fi
61824     else
61825       if test "x$OPENJDK_TARGET_OS" = xwindows; then
61826         # On Windows, we will need both .lib and .dll file.
61827         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61828           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61829 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61830           FOUND_FREETYPE=no
61831         fi
61832       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61833           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61834         # Found lib in isa dir, use that instead.
61835         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61836         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61837 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61838       fi
61839     fi
61840   fi
61841 
61842   if test "x$FOUND_FREETYPE" = xyes; then
61843 
61844   # Only process if variable expands to non-empty
61845 
61846   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61847     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61848 
61849   # Input might be given as Windows format, start by converting to
61850   # unix format.
61851   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61852   new_path=`$CYGPATH -u "$path"`
61853 
61854   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61855   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61856   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61857   # "foo.exe" is OK but "foo" is an error.
61858   #
61859   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61860   # It is also a way to make sure we got the proper file name for the real test later on.
61861   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61862   if test "x$test_shortpath" = x; then
61863     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61864 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61865     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61866   fi
61867 
61868   # Call helper function which possibly converts this using DOS-style short mode.
61869   # If so, the updated path is stored in $new_path.
61870 
61871   input_path="$new_path"
61872   # Check if we need to convert this using DOS-style short mode. If the path
61873   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61874   # take no chances and rewrite it.
61875   # Note: m4 eats our [], so we need to use [ and ] instead.
61876   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61877   if test "x$has_forbidden_chars" != x; then
61878     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61879     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61880     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61881     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61882       # Going to short mode and back again did indeed matter. Since short mode is
61883       # case insensitive, let's make it lowercase to improve readability.
61884       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61885       # Now convert it back to Unix-style (cygpath)
61886       input_path=`$CYGPATH -u "$shortmode_path"`
61887       new_path="$input_path"
61888     fi
61889   fi
61890 
61891   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61892   if test "x$test_cygdrive_prefix" = x; then
61893     # As a simple fix, exclude /usr/bin since it's not a real path.
61894     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61895       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61896       # a path prefixed by /cygdrive for fixpath to work.
61897       new_path="$CYGWIN_ROOT_PATH$input_path"
61898     fi
61899   fi
61900 
61901 
61902   if test "x$path" != "x$new_path"; then
61903     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61904     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61905 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61906   fi
61907 
61908     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61909 
61910   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61911   has_colon=`$ECHO $path | $GREP ^.:`
61912   new_path="$path"
61913   if test "x$has_colon" = x; then
61914     # Not in mixed or Windows style, start by that.
61915     new_path=`cmd //c echo $path`
61916   fi
61917 
61918 
61919   input_path="$new_path"
61920   # Check if we need to convert this using DOS-style short mode. If the path
61921   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61922   # take no chances and rewrite it.
61923   # Note: m4 eats our [], so we need to use [ and ] instead.
61924   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61925   if test "x$has_forbidden_chars" != x; then
61926     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61927     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61928   fi
61929 
61930 
61931   windows_path="$new_path"
61932   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61933     unix_path=`$CYGPATH -u "$windows_path"`
61934     new_path="$unix_path"
61935   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61936     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61937     new_path="$unix_path"
61938   fi
61939 
61940   if test "x$path" != "x$new_path"; then
61941     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61942     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61943 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61944   fi
61945 
61946   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61947   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61948 
61949     else
61950       # We're on a unix platform. Hooray! :)
61951       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61952       has_space=`$ECHO "$path" | $GREP " "`
61953       if test "x$has_space" != x; then
61954         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61955 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61956         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61957       fi
61958 
61959       # Use eval to expand a potential ~
61960       eval path="$path"
61961       if test ! -f "$path" && test ! -d "$path"; then
61962         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61963       fi
61964 
61965       if test -d "$path"; then
61966         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61967       else
61968         dir="`$DIRNAME "$path"`"
61969         base="`$BASENAME "$path"`"
61970         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61971       fi
61972     fi
61973   fi
61974 
61975 
61976   # Only process if variable expands to non-empty
61977 
61978   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61979     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61980 
61981   # Input might be given as Windows format, start by converting to
61982   # unix format.
61983   path="$POTENTIAL_FREETYPE_LIB_PATH"
61984   new_path=`$CYGPATH -u "$path"`
61985 
61986   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61987   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61988   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61989   # "foo.exe" is OK but "foo" is an error.
61990   #
61991   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61992   # It is also a way to make sure we got the proper file name for the real test later on.
61993   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61994   if test "x$test_shortpath" = x; then
61995     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61996 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61997     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61998   fi
61999 
62000   # Call helper function which possibly converts this using DOS-style short mode.
62001   # If so, the updated path is stored in $new_path.
62002 
62003   input_path="$new_path"
62004   # Check if we need to convert this using DOS-style short mode. If the path
62005   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62006   # take no chances and rewrite it.
62007   # Note: m4 eats our [], so we need to use [ and ] instead.
62008   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62009   if test "x$has_forbidden_chars" != x; then
62010     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62011     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62012     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62013     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62014       # Going to short mode and back again did indeed matter. Since short mode is
62015       # case insensitive, let's make it lowercase to improve readability.
62016       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62017       # Now convert it back to Unix-style (cygpath)
62018       input_path=`$CYGPATH -u "$shortmode_path"`
62019       new_path="$input_path"
62020     fi
62021   fi
62022 
62023   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62024   if test "x$test_cygdrive_prefix" = x; then
62025     # As a simple fix, exclude /usr/bin since it's not a real path.
62026     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62027       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62028       # a path prefixed by /cygdrive for fixpath to work.
62029       new_path="$CYGWIN_ROOT_PATH$input_path"
62030     fi
62031   fi
62032 
62033 
62034   if test "x$path" != "x$new_path"; then
62035     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62036     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62037 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62038   fi
62039 
62040     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62041 
62042   path="$POTENTIAL_FREETYPE_LIB_PATH"
62043   has_colon=`$ECHO $path | $GREP ^.:`
62044   new_path="$path"
62045   if test "x$has_colon" = x; then
62046     # Not in mixed or Windows style, start by that.
62047     new_path=`cmd //c echo $path`
62048   fi
62049 
62050 
62051   input_path="$new_path"
62052   # Check if we need to convert this using DOS-style short mode. If the path
62053   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62054   # take no chances and rewrite it.
62055   # Note: m4 eats our [], so we need to use [ and ] instead.
62056   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62057   if test "x$has_forbidden_chars" != x; then
62058     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62059     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62060   fi
62061 
62062 
62063   windows_path="$new_path"
62064   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62065     unix_path=`$CYGPATH -u "$windows_path"`
62066     new_path="$unix_path"
62067   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62068     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62069     new_path="$unix_path"
62070   fi
62071 
62072   if test "x$path" != "x$new_path"; then
62073     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62074     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62075 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62076   fi
62077 
62078   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62079   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62080 
62081     else
62082       # We're on a unix platform. Hooray! :)
62083       path="$POTENTIAL_FREETYPE_LIB_PATH"
62084       has_space=`$ECHO "$path" | $GREP " "`
62085       if test "x$has_space" != x; then
62086         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62087 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62088         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62089       fi
62090 
62091       # Use eval to expand a potential ~
62092       eval path="$path"
62093       if test ! -f "$path" && test ! -d "$path"; then
62094         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62095       fi
62096 
62097       if test -d "$path"; then
62098         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62099       else
62100         dir="`$DIRNAME "$path"`"
62101         base="`$BASENAME "$path"`"
62102         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62103       fi
62104     fi
62105   fi
62106 
62107 
62108     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62109     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62110 $as_echo_n "checking for freetype includes... " >&6; }
62111     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62112 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62113     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62114     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62115 $as_echo_n "checking for freetype libraries... " >&6; }
62116     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62117 $as_echo "$FREETYPE_LIB_PATH" >&6; }
62118   fi
62119 
62120             else
62121 
62122   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62123   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
62124   METHOD="well-known location"
62125 
62126   # Let's start with an optimistic view of the world :-)
62127   FOUND_FREETYPE=yes
62128 
62129   # First look for the canonical freetype main include file ft2build.h.
62130   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62131     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62132     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62133     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62134       # Fail.
62135       FOUND_FREETYPE=no
62136     fi
62137   fi
62138 
62139   if test "x$FOUND_FREETYPE" = xyes; then
62140     # Include file found, let's continue the sanity check.
62141     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62142 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62143 
62144     # Reset to default value
62145     FREETYPE_BASE_NAME=freetype
62146     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62147     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62148       if test "x$OPENJDK_TARGET_OS" = xmacosx \
62149           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62150         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62151         # for the .6 version explicitly.
62152         FREETYPE_BASE_NAME=freetype.6
62153         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62154         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62155 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62156       else
62157         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62158 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62159         FOUND_FREETYPE=no
62160       fi
62161     else
62162       if test "x$OPENJDK_TARGET_OS" = xwindows; then
62163         # On Windows, we will need both .lib and .dll file.
62164         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62165           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62166 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62167           FOUND_FREETYPE=no
62168         fi
62169       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62170           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62171         # Found lib in isa dir, use that instead.
62172         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62173         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62174 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62175       fi
62176     fi
62177   fi
62178 
62179   if test "x$FOUND_FREETYPE" = xyes; then
62180 
62181   # Only process if variable expands to non-empty
62182 
62183   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62184     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62185 
62186   # Input might be given as Windows format, start by converting to
62187   # unix format.
62188   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62189   new_path=`$CYGPATH -u "$path"`
62190 
62191   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62192   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62193   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62194   # "foo.exe" is OK but "foo" is an error.
62195   #
62196   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62197   # It is also a way to make sure we got the proper file name for the real test later on.
62198   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62199   if test "x$test_shortpath" = x; then
62200     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62201 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62202     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62203   fi
62204 
62205   # Call helper function which possibly converts this using DOS-style short mode.
62206   # If so, the updated path is stored in $new_path.
62207 
62208   input_path="$new_path"
62209   # Check if we need to convert this using DOS-style short mode. If the path
62210   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62211   # take no chances and rewrite it.
62212   # Note: m4 eats our [], so we need to use [ and ] instead.
62213   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62214   if test "x$has_forbidden_chars" != x; then
62215     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62216     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62217     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62218     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62219       # Going to short mode and back again did indeed matter. Since short mode is
62220       # case insensitive, let's make it lowercase to improve readability.
62221       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62222       # Now convert it back to Unix-style (cygpath)
62223       input_path=`$CYGPATH -u "$shortmode_path"`
62224       new_path="$input_path"
62225     fi
62226   fi
62227 
62228   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62229   if test "x$test_cygdrive_prefix" = x; then
62230     # As a simple fix, exclude /usr/bin since it's not a real path.
62231     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62232       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62233       # a path prefixed by /cygdrive for fixpath to work.
62234       new_path="$CYGWIN_ROOT_PATH$input_path"
62235     fi
62236   fi
62237 
62238 
62239   if test "x$path" != "x$new_path"; then
62240     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62241     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62242 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62243   fi
62244 
62245     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62246 
62247   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62248   has_colon=`$ECHO $path | $GREP ^.:`
62249   new_path="$path"
62250   if test "x$has_colon" = x; then
62251     # Not in mixed or Windows style, start by that.
62252     new_path=`cmd //c echo $path`
62253   fi
62254 
62255 
62256   input_path="$new_path"
62257   # Check if we need to convert this using DOS-style short mode. If the path
62258   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62259   # take no chances and rewrite it.
62260   # Note: m4 eats our [], so we need to use [ and ] instead.
62261   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62262   if test "x$has_forbidden_chars" != x; then
62263     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62264     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62265   fi
62266 
62267 
62268   windows_path="$new_path"
62269   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62270     unix_path=`$CYGPATH -u "$windows_path"`
62271     new_path="$unix_path"
62272   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62273     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62274     new_path="$unix_path"
62275   fi
62276 
62277   if test "x$path" != "x$new_path"; then
62278     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62279     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62280 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62281   fi
62282 
62283   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62284   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62285 
62286     else
62287       # We're on a unix platform. Hooray! :)
62288       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62289       has_space=`$ECHO "$path" | $GREP " "`
62290       if test "x$has_space" != x; then
62291         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62292 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62293         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62294       fi
62295 
62296       # Use eval to expand a potential ~
62297       eval path="$path"
62298       if test ! -f "$path" && test ! -d "$path"; then
62299         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62300       fi
62301 
62302       if test -d "$path"; then
62303         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62304       else
62305         dir="`$DIRNAME "$path"`"
62306         base="`$BASENAME "$path"`"
62307         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62308       fi
62309     fi
62310   fi
62311 
62312 
62313   # Only process if variable expands to non-empty
62314 
62315   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62316     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62317 
62318   # Input might be given as Windows format, start by converting to
62319   # unix format.
62320   path="$POTENTIAL_FREETYPE_LIB_PATH"
62321   new_path=`$CYGPATH -u "$path"`
62322 
62323   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62324   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62325   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62326   # "foo.exe" is OK but "foo" is an error.
62327   #
62328   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62329   # It is also a way to make sure we got the proper file name for the real test later on.
62330   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62331   if test "x$test_shortpath" = x; then
62332     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62333 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62334     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62335   fi
62336 
62337   # Call helper function which possibly converts this using DOS-style short mode.
62338   # If so, the updated path is stored in $new_path.
62339 
62340   input_path="$new_path"
62341   # Check if we need to convert this using DOS-style short mode. If the path
62342   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62343   # take no chances and rewrite it.
62344   # Note: m4 eats our [], so we need to use [ and ] instead.
62345   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62346   if test "x$has_forbidden_chars" != x; then
62347     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62348     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62349     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62350     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62351       # Going to short mode and back again did indeed matter. Since short mode is
62352       # case insensitive, let's make it lowercase to improve readability.
62353       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62354       # Now convert it back to Unix-style (cygpath)
62355       input_path=`$CYGPATH -u "$shortmode_path"`
62356       new_path="$input_path"
62357     fi
62358   fi
62359 
62360   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62361   if test "x$test_cygdrive_prefix" = x; then
62362     # As a simple fix, exclude /usr/bin since it's not a real path.
62363     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62364       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62365       # a path prefixed by /cygdrive for fixpath to work.
62366       new_path="$CYGWIN_ROOT_PATH$input_path"
62367     fi
62368   fi
62369 
62370 
62371   if test "x$path" != "x$new_path"; then
62372     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62373     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62374 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62375   fi
62376 
62377     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62378 
62379   path="$POTENTIAL_FREETYPE_LIB_PATH"
62380   has_colon=`$ECHO $path | $GREP ^.:`
62381   new_path="$path"
62382   if test "x$has_colon" = x; then
62383     # Not in mixed or Windows style, start by that.
62384     new_path=`cmd //c echo $path`
62385   fi
62386 
62387 
62388   input_path="$new_path"
62389   # Check if we need to convert this using DOS-style short mode. If the path
62390   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62391   # take no chances and rewrite it.
62392   # Note: m4 eats our [], so we need to use [ and ] instead.
62393   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62394   if test "x$has_forbidden_chars" != x; then
62395     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62396     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62397   fi
62398 
62399 
62400   windows_path="$new_path"
62401   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62402     unix_path=`$CYGPATH -u "$windows_path"`
62403     new_path="$unix_path"
62404   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62405     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62406     new_path="$unix_path"
62407   fi
62408 
62409   if test "x$path" != "x$new_path"; then
62410     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62411     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62412 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62413   fi
62414 
62415   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62416   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62417 
62418     else
62419       # We're on a unix platform. Hooray! :)
62420       path="$POTENTIAL_FREETYPE_LIB_PATH"
62421       has_space=`$ECHO "$path" | $GREP " "`
62422       if test "x$has_space" != x; then
62423         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62424 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62425         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62426       fi
62427 
62428       # Use eval to expand a potential ~
62429       eval path="$path"
62430       if test ! -f "$path" && test ! -d "$path"; then
62431         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62432       fi
62433 
62434       if test -d "$path"; then
62435         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62436       else
62437         dir="`$DIRNAME "$path"`"
62438         base="`$BASENAME "$path"`"
62439         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62440       fi
62441     fi
62442   fi
62443 
62444 
62445     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62446     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62447 $as_echo_n "checking for freetype includes... " >&6; }
62448     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62449 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62450     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62451     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62452 $as_echo_n "checking for freetype libraries... " >&6; }
62453     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62454 $as_echo "$FREETYPE_LIB_PATH" >&6; }
62455   fi
62456 
62457               if test "x$FOUND_FREETYPE" != xyes; then
62458 
62459   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62460   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
62461   METHOD="well-known location"
62462 
62463   # Let's start with an optimistic view of the world :-)
62464   FOUND_FREETYPE=yes
62465 
62466   # First look for the canonical freetype main include file ft2build.h.
62467   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62468     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62469     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62470     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62471       # Fail.
62472       FOUND_FREETYPE=no
62473     fi
62474   fi
62475 
62476   if test "x$FOUND_FREETYPE" = xyes; then
62477     # Include file found, let's continue the sanity check.
62478     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62479 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62480 
62481     # Reset to default value
62482     FREETYPE_BASE_NAME=freetype
62483     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62484     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62485       if test "x$OPENJDK_TARGET_OS" = xmacosx \
62486           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62487         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62488         # for the .6 version explicitly.
62489         FREETYPE_BASE_NAME=freetype.6
62490         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62491         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62492 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62493       else
62494         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62495 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62496         FOUND_FREETYPE=no
62497       fi
62498     else
62499       if test "x$OPENJDK_TARGET_OS" = xwindows; then
62500         # On Windows, we will need both .lib and .dll file.
62501         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62502           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62503 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62504           FOUND_FREETYPE=no
62505         fi
62506       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62507           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62508         # Found lib in isa dir, use that instead.
62509         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62510         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62511 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62512       fi
62513     fi
62514   fi
62515 
62516   if test "x$FOUND_FREETYPE" = xyes; then
62517 
62518   # Only process if variable expands to non-empty
62519 
62520   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62521     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62522 
62523   # Input might be given as Windows format, start by converting to
62524   # unix format.
62525   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62526   new_path=`$CYGPATH -u "$path"`
62527 
62528   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62529   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62530   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62531   # "foo.exe" is OK but "foo" is an error.
62532   #
62533   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62534   # It is also a way to make sure we got the proper file name for the real test later on.
62535   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62536   if test "x$test_shortpath" = x; then
62537     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62538 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62539     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62540   fi
62541 
62542   # Call helper function which possibly converts this using DOS-style short mode.
62543   # If so, the updated path is stored in $new_path.
62544 
62545   input_path="$new_path"
62546   # Check if we need to convert this using DOS-style short mode. If the path
62547   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62548   # take no chances and rewrite it.
62549   # Note: m4 eats our [], so we need to use [ and ] instead.
62550   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62551   if test "x$has_forbidden_chars" != x; then
62552     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62553     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62554     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62555     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62556       # Going to short mode and back again did indeed matter. Since short mode is
62557       # case insensitive, let's make it lowercase to improve readability.
62558       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62559       # Now convert it back to Unix-style (cygpath)
62560       input_path=`$CYGPATH -u "$shortmode_path"`
62561       new_path="$input_path"
62562     fi
62563   fi
62564 
62565   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62566   if test "x$test_cygdrive_prefix" = x; then
62567     # As a simple fix, exclude /usr/bin since it's not a real path.
62568     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62569       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62570       # a path prefixed by /cygdrive for fixpath to work.
62571       new_path="$CYGWIN_ROOT_PATH$input_path"
62572     fi
62573   fi
62574 
62575 
62576   if test "x$path" != "x$new_path"; then
62577     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62578     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62579 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62580   fi
62581 
62582     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62583 
62584   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62585   has_colon=`$ECHO $path | $GREP ^.:`
62586   new_path="$path"
62587   if test "x$has_colon" = x; then
62588     # Not in mixed or Windows style, start by that.
62589     new_path=`cmd //c echo $path`
62590   fi
62591 
62592 
62593   input_path="$new_path"
62594   # Check if we need to convert this using DOS-style short mode. If the path
62595   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62596   # take no chances and rewrite it.
62597   # Note: m4 eats our [], so we need to use [ and ] instead.
62598   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62599   if test "x$has_forbidden_chars" != x; then
62600     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62601     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62602   fi
62603 
62604 
62605   windows_path="$new_path"
62606   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62607     unix_path=`$CYGPATH -u "$windows_path"`
62608     new_path="$unix_path"
62609   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62610     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62611     new_path="$unix_path"
62612   fi
62613 
62614   if test "x$path" != "x$new_path"; then
62615     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62616     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62617 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62618   fi
62619 
62620   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62621   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62622 
62623     else
62624       # We're on a unix platform. Hooray! :)
62625       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62626       has_space=`$ECHO "$path" | $GREP " "`
62627       if test "x$has_space" != x; then
62628         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62629 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62630         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62631       fi
62632 
62633       # Use eval to expand a potential ~
62634       eval path="$path"
62635       if test ! -f "$path" && test ! -d "$path"; then
62636         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62637       fi
62638 
62639       if test -d "$path"; then
62640         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62641       else
62642         dir="`$DIRNAME "$path"`"
62643         base="`$BASENAME "$path"`"
62644         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62645       fi
62646     fi
62647   fi
62648 
62649 
62650   # Only process if variable expands to non-empty
62651 
62652   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62653     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62654 
62655   # Input might be given as Windows format, start by converting to
62656   # unix format.
62657   path="$POTENTIAL_FREETYPE_LIB_PATH"
62658   new_path=`$CYGPATH -u "$path"`
62659 
62660   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62661   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62662   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62663   # "foo.exe" is OK but "foo" is an error.
62664   #
62665   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62666   # It is also a way to make sure we got the proper file name for the real test later on.
62667   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62668   if test "x$test_shortpath" = x; then
62669     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62670 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62671     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62672   fi
62673 
62674   # Call helper function which possibly converts this using DOS-style short mode.
62675   # If so, the updated path is stored in $new_path.
62676 
62677   input_path="$new_path"
62678   # Check if we need to convert this using DOS-style short mode. If the path
62679   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62680   # take no chances and rewrite it.
62681   # Note: m4 eats our [], so we need to use [ and ] instead.
62682   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62683   if test "x$has_forbidden_chars" != x; then
62684     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62685     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62686     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62687     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62688       # Going to short mode and back again did indeed matter. Since short mode is
62689       # case insensitive, let's make it lowercase to improve readability.
62690       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62691       # Now convert it back to Unix-style (cygpath)
62692       input_path=`$CYGPATH -u "$shortmode_path"`
62693       new_path="$input_path"
62694     fi
62695   fi
62696 
62697   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62698   if test "x$test_cygdrive_prefix" = x; then
62699     # As a simple fix, exclude /usr/bin since it's not a real path.
62700     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62701       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62702       # a path prefixed by /cygdrive for fixpath to work.
62703       new_path="$CYGWIN_ROOT_PATH$input_path"
62704     fi
62705   fi
62706 
62707 
62708   if test "x$path" != "x$new_path"; then
62709     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62710     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62711 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62712   fi
62713 
62714     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62715 
62716   path="$POTENTIAL_FREETYPE_LIB_PATH"
62717   has_colon=`$ECHO $path | $GREP ^.:`
62718   new_path="$path"
62719   if test "x$has_colon" = x; then
62720     # Not in mixed or Windows style, start by that.
62721     new_path=`cmd //c echo $path`
62722   fi
62723 
62724 
62725   input_path="$new_path"
62726   # Check if we need to convert this using DOS-style short mode. If the path
62727   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62728   # take no chances and rewrite it.
62729   # Note: m4 eats our [], so we need to use [ and ] instead.
62730   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62731   if test "x$has_forbidden_chars" != x; then
62732     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62733     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62734   fi
62735 
62736 
62737   windows_path="$new_path"
62738   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62739     unix_path=`$CYGPATH -u "$windows_path"`
62740     new_path="$unix_path"
62741   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62742     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62743     new_path="$unix_path"
62744   fi
62745 
62746   if test "x$path" != "x$new_path"; then
62747     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62748     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62749 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62750   fi
62751 
62752   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62753   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62754 
62755     else
62756       # We're on a unix platform. Hooray! :)
62757       path="$POTENTIAL_FREETYPE_LIB_PATH"
62758       has_space=`$ECHO "$path" | $GREP " "`
62759       if test "x$has_space" != x; then
62760         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62761 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62762         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62763       fi
62764 
62765       # Use eval to expand a potential ~
62766       eval path="$path"
62767       if test ! -f "$path" && test ! -d "$path"; then
62768         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62769       fi
62770 
62771       if test -d "$path"; then
62772         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62773       else
62774         dir="`$DIRNAME "$path"`"
62775         base="`$BASENAME "$path"`"
62776         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62777       fi
62778     fi
62779   fi
62780 
62781 
62782     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62783     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62784 $as_echo_n "checking for freetype includes... " >&6; }
62785     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62786 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62787     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62788     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62789 $as_echo_n "checking for freetype libraries... " >&6; }
62790     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62791 $as_echo "$FREETYPE_LIB_PATH" >&6; }
62792   fi
62793 
62794               fi
62795             fi
62796           fi
62797         fi
62798       fi # end check in well-known locations
62799 
62800       if test "x$FOUND_FREETYPE" != xyes; then
62801 
62802   # Print a helpful message on how to acquire the necessary build dependency.
62803   # freetype is the help tag: freetype, cups, alsa etc
62804   MISSING_DEPENDENCY=freetype
62805 
62806   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62807     cygwin_help $MISSING_DEPENDENCY
62808   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62809     msys_help $MISSING_DEPENDENCY
62810   else
62811     PKGHANDLER_COMMAND=
62812 
62813     case $PKGHANDLER in
62814       apt-get)
62815         apt_help     $MISSING_DEPENDENCY ;;
62816       yum)
62817         yum_help     $MISSING_DEPENDENCY ;;
62818       brew)
62819         brew_help    $MISSING_DEPENDENCY ;;
62820       port)
62821         port_help    $MISSING_DEPENDENCY ;;
62822       pkgutil)
62823         pkgutil_help $MISSING_DEPENDENCY ;;
62824       pkgadd)
62825         pkgadd_help  $MISSING_DEPENDENCY ;;
62826     esac
62827 
62828     if test "x$PKGHANDLER_COMMAND" != x; then
62829       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62830     fi
62831   fi
62832 
62833         as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
62834       fi
62835     fi # end user specified settings
62836 
62837     # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
62838     if test "x$FREETYPE_CFLAGS" = x; then
62839 
62840   # Only process if variable expands to non-empty
62841 
62842   if test "x$FREETYPE_INCLUDE_PATH" != x; then
62843     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62844 
62845   # Input might be given as Windows format, start by converting to
62846   # unix format.
62847   path="$FREETYPE_INCLUDE_PATH"
62848   new_path=`$CYGPATH -u "$path"`
62849 
62850   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62851   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62852   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62853   # "foo.exe" is OK but "foo" is an error.
62854   #
62855   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62856   # It is also a way to make sure we got the proper file name for the real test later on.
62857   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62858   if test "x$test_shortpath" = x; then
62859     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62860 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62861     as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
62862   fi
62863 
62864   # Call helper function which possibly converts this using DOS-style short mode.
62865   # If so, the updated path is stored in $new_path.
62866 
62867   input_path="$new_path"
62868   # Check if we need to convert this using DOS-style short mode. If the path
62869   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62870   # take no chances and rewrite it.
62871   # Note: m4 eats our [], so we need to use [ and ] instead.
62872   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62873   if test "x$has_forbidden_chars" != x; then
62874     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62875     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62876     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62877     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62878       # Going to short mode and back again did indeed matter. Since short mode is
62879       # case insensitive, let's make it lowercase to improve readability.
62880       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62881       # Now convert it back to Unix-style (cygpath)
62882       input_path=`$CYGPATH -u "$shortmode_path"`
62883       new_path="$input_path"
62884     fi
62885   fi
62886 
62887   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62888   if test "x$test_cygdrive_prefix" = x; then
62889     # As a simple fix, exclude /usr/bin since it's not a real path.
62890     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62891       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62892       # a path prefixed by /cygdrive for fixpath to work.
62893       new_path="$CYGWIN_ROOT_PATH$input_path"
62894     fi
62895   fi
62896 
62897 
62898   if test "x$path" != "x$new_path"; then
62899     FREETYPE_INCLUDE_PATH="$new_path"
62900     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62901 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62902   fi
62903 
62904     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62905 
62906   path="$FREETYPE_INCLUDE_PATH"
62907   has_colon=`$ECHO $path | $GREP ^.:`
62908   new_path="$path"
62909   if test "x$has_colon" = x; then
62910     # Not in mixed or Windows style, start by that.
62911     new_path=`cmd //c echo $path`
62912   fi
62913 
62914 
62915   input_path="$new_path"
62916   # Check if we need to convert this using DOS-style short mode. If the path
62917   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62918   # take no chances and rewrite it.
62919   # Note: m4 eats our [], so we need to use [ and ] instead.
62920   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62921   if test "x$has_forbidden_chars" != x; then
62922     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62923     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62924   fi
62925 
62926 
62927   windows_path="$new_path"
62928   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62929     unix_path=`$CYGPATH -u "$windows_path"`
62930     new_path="$unix_path"
62931   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62932     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62933     new_path="$unix_path"
62934   fi
62935 
62936   if test "x$path" != "x$new_path"; then
62937     FREETYPE_INCLUDE_PATH="$new_path"
62938     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62939 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62940   fi
62941 
62942   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62943   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62944 
62945     else
62946       # We're on a unix platform. Hooray! :)
62947       path="$FREETYPE_INCLUDE_PATH"
62948       has_space=`$ECHO "$path" | $GREP " "`
62949       if test "x$has_space" != x; then
62950         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62951 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62952         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62953       fi
62954 
62955       # Use eval to expand a potential ~
62956       eval path="$path"
62957       if test ! -f "$path" && test ! -d "$path"; then
62958         as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62959       fi
62960 
62961       if test -d "$path"; then
62962         FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62963       else
62964         dir="`$DIRNAME "$path"`"
62965         base="`$BASENAME "$path"`"
62966         FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62967       fi
62968     fi
62969   fi
62970 
62971       if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
62972         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
62973       else
62974         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
62975       fi
62976     fi
62977 
62978     if test "x$FREETYPE_LIBS" = x; then
62979 
62980   # Only process if variable expands to non-empty
62981 
62982   if test "x$FREETYPE_LIB_PATH" != x; then
62983     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62984 
62985   # Input might be given as Windows format, start by converting to
62986   # unix format.
62987   path="$FREETYPE_LIB_PATH"
62988   new_path=`$CYGPATH -u "$path"`
62989 
62990   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62991   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62992   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62993   # "foo.exe" is OK but "foo" is an error.
62994   #
62995   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62996   # It is also a way to make sure we got the proper file name for the real test later on.
62997   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62998   if test "x$test_shortpath" = x; then
62999     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63000 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63001     as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
63002   fi
63003 
63004   # Call helper function which possibly converts this using DOS-style short mode.
63005   # If so, the updated path is stored in $new_path.
63006 
63007   input_path="$new_path"
63008   # Check if we need to convert this using DOS-style short mode. If the path
63009   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63010   # take no chances and rewrite it.
63011   # Note: m4 eats our [], so we need to use [ and ] instead.
63012   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63013   if test "x$has_forbidden_chars" != x; then
63014     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63015     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63016     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63017     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63018       # Going to short mode and back again did indeed matter. Since short mode is
63019       # case insensitive, let's make it lowercase to improve readability.
63020       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63021       # Now convert it back to Unix-style (cygpath)
63022       input_path=`$CYGPATH -u "$shortmode_path"`
63023       new_path="$input_path"
63024     fi
63025   fi
63026 
63027   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63028   if test "x$test_cygdrive_prefix" = x; then
63029     # As a simple fix, exclude /usr/bin since it's not a real path.
63030     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63031       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63032       # a path prefixed by /cygdrive for fixpath to work.
63033       new_path="$CYGWIN_ROOT_PATH$input_path"
63034     fi
63035   fi
63036 
63037 
63038   if test "x$path" != "x$new_path"; then
63039     FREETYPE_LIB_PATH="$new_path"
63040     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
63041 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63042   fi
63043 
63044     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63045 
63046   path="$FREETYPE_LIB_PATH"
63047   has_colon=`$ECHO $path | $GREP ^.:`
63048   new_path="$path"
63049   if test "x$has_colon" = x; then
63050     # Not in mixed or Windows style, start by that.
63051     new_path=`cmd //c echo $path`
63052   fi
63053 
63054 
63055   input_path="$new_path"
63056   # Check if we need to convert this using DOS-style short mode. If the path
63057   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63058   # take no chances and rewrite it.
63059   # Note: m4 eats our [], so we need to use [ and ] instead.
63060   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63061   if test "x$has_forbidden_chars" != x; then
63062     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63063     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63064   fi
63065 
63066 
63067   windows_path="$new_path"
63068   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63069     unix_path=`$CYGPATH -u "$windows_path"`
63070     new_path="$unix_path"
63071   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63072     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63073     new_path="$unix_path"
63074   fi
63075 
63076   if test "x$path" != "x$new_path"; then
63077     FREETYPE_LIB_PATH="$new_path"
63078     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
63079 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63080   fi
63081 
63082   # Save the first 10 bytes of this path to the storage, so fixpath can work.
63083   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63084 
63085     else
63086       # We're on a unix platform. Hooray! :)
63087       path="$FREETYPE_LIB_PATH"
63088       has_space=`$ECHO "$path" | $GREP " "`
63089       if test "x$has_space" != x; then
63090         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63091 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63092         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63093       fi
63094 
63095       # Use eval to expand a potential ~
63096       eval path="$path"
63097       if test ! -f "$path" && test ! -d "$path"; then
63098         as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63099       fi
63100 
63101       if test -d "$path"; then
63102         FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63103       else
63104         dir="`$DIRNAME "$path"`"
63105         base="`$BASENAME "$path"`"
63106         FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63107       fi
63108     fi
63109   fi
63110 
63111       if test "x$OPENJDK_TARGET_OS" = xwindows; then
63112         FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
63113       else
63114         FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
63115       fi
63116     fi
63117 
63118     # Try to compile it
63119     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
63120 $as_echo_n "checking if we can compile and link with freetype... " >&6; }
63121     ac_ext=cpp
63122 ac_cpp='$CXXCPP $CPPFLAGS'
63123 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63124 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63125 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63126 
63127     PREV_CXXCFLAGS="$CXXFLAGS"
63128     PREV_LIBS="$LIBS"
63129     PREV_CXX="$CXX"
63130     CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
63131     LIBS="$LIBS $FREETYPE_LIBS"
63132     CXX="$FIXPATH $CXX"
63133     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63134 /* end confdefs.h.  */
63135 
63136           #include<ft2build.h>
63137           #include FT_FREETYPE_H
63138           int main () {
63139             FT_Init_FreeType(NULL);
63140             return 0;
63141           }
63142 
63143 _ACEOF
63144 if ac_fn_cxx_try_link "$LINENO"; then :
63145 
63146           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63147 $as_echo "yes" >&6; }
63148 
63149 else
63150 
63151           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63152 $as_echo "no" >&6; }
63153           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
63154 $as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
63155           { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
63156 $as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
63157 
63158 
63159   # Print a helpful message on how to acquire the necessary build dependency.
63160   # freetype is the help tag: freetype, cups, alsa etc
63161   MISSING_DEPENDENCY=freetype
63162 
63163   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63164     cygwin_help $MISSING_DEPENDENCY
63165   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63166     msys_help $MISSING_DEPENDENCY
63167   else
63168     PKGHANDLER_COMMAND=
63169 
63170     case $PKGHANDLER in
63171       apt-get)
63172         apt_help     $MISSING_DEPENDENCY ;;
63173       yum)
63174         yum_help     $MISSING_DEPENDENCY ;;
63175       brew)
63176         brew_help    $MISSING_DEPENDENCY ;;
63177       port)
63178         port_help    $MISSING_DEPENDENCY ;;
63179       pkgutil)
63180         pkgutil_help $MISSING_DEPENDENCY ;;
63181       pkgadd)
63182         pkgadd_help  $MISSING_DEPENDENCY ;;
63183     esac
63184 
63185     if test "x$PKGHANDLER_COMMAND" != x; then
63186       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63187     fi
63188   fi
63189 
63190 
63191           as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
63192 
63193 
63194 fi
63195 rm -f core conftest.err conftest.$ac_objext \
63196     conftest$ac_exeext conftest.$ac_ext
63197     CXXCFLAGS="$PREV_CXXFLAGS"
63198     LIBS="$PREV_LIBS"
63199     CXX="$PREV_CXX"
63200     ac_ext=cpp
63201 ac_cpp='$CXXCPP $CPPFLAGS'
63202 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63203 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63204 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63205 
63206 
63207     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
63208 $as_echo_n "checking if we should bundle freetype... " >&6; }
63209     if test "x$BUNDLE_FREETYPE" = xyes; then
63210       FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
63211     fi
63212     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
63213 $as_echo "$BUNDLE_FREETYPE" >&6; }
63214 
63215   fi # end freetype needed
63216 
63217 
63218 
63219 
63220 
63221 
63222 
63223 # Check whether --with-alsa was given.
63224 if test "${with_alsa+set}" = set; then :
63225   withval=$with_alsa;
63226 fi
63227 
63228 
63229 # Check whether --with-alsa-include was given.
63230 if test "${with_alsa_include+set}" = set; then :
63231   withval=$with_alsa_include;
63232 fi
63233 
63234 
63235 # Check whether --with-alsa-lib was given.
63236 if test "${with_alsa_lib+set}" = set; then :
63237   withval=$with_alsa_lib;
63238 fi
63239 
63240 
63241   if test "x$NEEDS_LIB_ALSA" = xfalse; then
63242     if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
63243         (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
63244         (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
63245       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
63246 $as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
63247     fi
63248     ALSA_CFLAGS=
63249     ALSA_LIBS=
63250   else
63251     ALSA_FOUND=no
63252 
63253     if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
63254       as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
63255     fi
63256 
63257     if test "x${with_alsa}" != x; then
63258       ALSA_LIBS="-L${with_alsa}/lib -lasound"
63259       ALSA_CFLAGS="-I${with_alsa}/include"
63260       ALSA_FOUND=yes
63261     fi
63262     if test "x${with_alsa_include}" != x; then
63263       ALSA_CFLAGS="-I${with_alsa_include}"
63264       ALSA_FOUND=yes
63265     fi
63266     if test "x${with_alsa_lib}" != x; then
63267       ALSA_LIBS="-L${with_alsa_lib} -lasound"
63268       ALSA_FOUND=yes
63269     fi
63270     # Do not try pkg-config if we have a sysroot set.
63271     if test "x$SYSROOT" = x; then
63272       if test "x$ALSA_FOUND" = xno; then
63273 
63274 pkg_failed=no
63275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
63276 $as_echo_n "checking for ALSA... " >&6; }
63277 
63278 if test -n "$ALSA_CFLAGS"; then
63279     pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
63280  elif test -n "$PKG_CONFIG"; then
63281     if test -n "$PKG_CONFIG" && \
63282     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
63283   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
63284   ac_status=$?
63285   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63286   test $ac_status = 0; }; then
63287   pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
63288 else
63289   pkg_failed=yes
63290 fi
63291  else
63292     pkg_failed=untried
63293 fi
63294 if test -n "$ALSA_LIBS"; then
63295     pkg_cv_ALSA_LIBS="$ALSA_LIBS"
63296  elif test -n "$PKG_CONFIG"; then
63297     if test -n "$PKG_CONFIG" && \
63298     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
63299   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
63300   ac_status=$?
63301   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63302   test $ac_status = 0; }; then
63303   pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
63304 else
63305   pkg_failed=yes
63306 fi
63307  else
63308     pkg_failed=untried
63309 fi
63310 
63311 
63312 
63313 if test $pkg_failed = yes; then
63314 
63315 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63316         _pkg_short_errors_supported=yes
63317 else
63318         _pkg_short_errors_supported=no
63319 fi
63320         if test $_pkg_short_errors_supported = yes; then
63321                 ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
63322         else
63323                 ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
63324         fi
63325         # Put the nasty error message in config.log where it belongs
63326         echo "$ALSA_PKG_ERRORS" >&5
63327 
63328         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63329 $as_echo "no" >&6; }
63330                 ALSA_FOUND=no
63331 elif test $pkg_failed = untried; then
63332         ALSA_FOUND=no
63333 else
63334         ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
63335         ALSA_LIBS=$pkg_cv_ALSA_LIBS
63336         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63337 $as_echo "yes" >&6; }
63338         ALSA_FOUND=yes
63339 fi
63340       fi
63341     fi
63342     if test "x$ALSA_FOUND" = xno; then
63343       for ac_header in alsa/asoundlib.h
63344 do :
63345   ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
63346 if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
63347   cat >>confdefs.h <<_ACEOF
63348 #define HAVE_ALSA_ASOUNDLIB_H 1
63349 _ACEOF
63350 
63351             ALSA_FOUND=yes
63352             ALSA_CFLAGS=-Iignoreme
63353             ALSA_LIBS=-lasound
63354             DEFAULT_ALSA=yes
63355 
63356 else
63357   ALSA_FOUND=no
63358 
63359 fi
63360 
63361 done
63362 
63363     fi
63364     if test "x$ALSA_FOUND" = xno; then
63365 
63366   # Print a helpful message on how to acquire the necessary build dependency.
63367   # alsa is the help tag: freetype, cups, alsa etc
63368   MISSING_DEPENDENCY=alsa
63369 
63370   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63371     cygwin_help $MISSING_DEPENDENCY
63372   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63373     msys_help $MISSING_DEPENDENCY
63374   else
63375     PKGHANDLER_COMMAND=
63376 
63377     case $PKGHANDLER in
63378       apt-get)
63379         apt_help     $MISSING_DEPENDENCY ;;
63380       yum)
63381         yum_help     $MISSING_DEPENDENCY ;;
63382       brew)
63383         brew_help    $MISSING_DEPENDENCY ;;
63384       port)
63385         port_help    $MISSING_DEPENDENCY ;;
63386       pkgutil)
63387         pkgutil_help $MISSING_DEPENDENCY ;;
63388       pkgadd)
63389         pkgadd_help  $MISSING_DEPENDENCY ;;
63390     esac
63391 
63392     if test "x$PKGHANDLER_COMMAND" != x; then
63393       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63394     fi
63395   fi
63396 
63397       as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
63398     fi
63399   fi
63400 
63401 
63402 
63403 
63404 
63405 
63406 # Check whether --with-libffi was given.
63407 if test "${with_libffi+set}" = set; then :
63408   withval=$with_libffi;
63409 fi
63410 
63411 
63412 # Check whether --with-libffi-include was given.
63413 if test "${with_libffi_include+set}" = set; then :
63414   withval=$with_libffi_include;
63415 fi
63416 
63417 
63418 # Check whether --with-libffi-lib was given.
63419 if test "${with_libffi_lib+set}" = set; then :
63420   withval=$with_libffi_lib;
63421 fi
63422 
63423   # Check whether --enable-libffi-bundling was given.
63424 if test "${enable_libffi_bundling+set}" = set; then :
63425   enableval=$enable_libffi_bundling;
63426 fi
63427 
63428 
63429   if test "x$NEEDS_LIB_FFI" = xfalse; then
63430     if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
63431         (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
63432         (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
63433       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
63434 $as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
63435     fi
63436     LIBFFI_CFLAGS=
63437     LIBFFI_LIBS=
63438   else
63439     LIBFFI_FOUND=no
63440 
63441     if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
63442       as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
63443     fi
63444 
63445     if test "x${with_libffi}" != x; then
63446       LIBFFI_LIB_PATH="${with_libffi}/lib"
63447       LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
63448       LIBFFI_CFLAGS="-I${with_libffi}/include"
63449       LIBFFI_FOUND=yes
63450     fi
63451     if test "x${with_libffi_include}" != x; then
63452       LIBFFI_CFLAGS="-I${with_libffi_include}"
63453       LIBFFI_FOUND=yes
63454     fi
63455     if test "x${with_libffi_lib}" != x; then
63456       LIBFFI_LIB_PATH="${with_libffi_lib}"
63457       LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
63458       LIBFFI_FOUND=yes
63459     fi
63460     # Do not try pkg-config if we have a sysroot set.
63461     if test "x$SYSROOT" = x; then
63462       if test "x$LIBFFI_FOUND" = xno; then
63463         # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
63464 
63465 pkg_failed=no
63466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
63467 $as_echo_n "checking for LIBFFI... " >&6; }
63468 
63469 if test -n "$LIBFFI_CFLAGS"; then
63470     pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
63471  elif test -n "$PKG_CONFIG"; then
63472     if test -n "$PKG_CONFIG" && \
63473     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
63474   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
63475   ac_status=$?
63476   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63477   test $ac_status = 0; }; then
63478   pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
63479 else
63480   pkg_failed=yes
63481 fi
63482  else
63483     pkg_failed=untried
63484 fi
63485 if test -n "$LIBFFI_LIBS"; then
63486     pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
63487  elif test -n "$PKG_CONFIG"; then
63488     if test -n "$PKG_CONFIG" && \
63489     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
63490   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
63491   ac_status=$?
63492   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63493   test $ac_status = 0; }; then
63494   pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
63495 else
63496   pkg_failed=yes
63497 fi
63498  else
63499     pkg_failed=untried
63500 fi
63501 
63502 
63503 
63504 if test $pkg_failed = yes; then
63505 
63506 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63507         _pkg_short_errors_supported=yes
63508 else
63509         _pkg_short_errors_supported=no
63510 fi
63511         if test $_pkg_short_errors_supported = yes; then
63512                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
63513         else
63514                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
63515         fi
63516         # Put the nasty error message in config.log where it belongs
63517         echo "$LIBFFI_PKG_ERRORS" >&5
63518 
63519         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63520 $as_echo "no" >&6; }
63521                 LIBFFI_FOUND=no
63522 elif test $pkg_failed = untried; then
63523         LIBFFI_FOUND=no
63524 else
63525         LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
63526         LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
63527         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63528 $as_echo "yes" >&6; }
63529         LIBFFI_FOUND=yes
63530 fi
63531       fi
63532     fi
63533     if test "x$LIBFFI_FOUND" = xno; then
63534       for ac_header in ffi.h
63535 do :
63536   ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
63537 if test "x$ac_cv_header_ffi_h" = xyes; then :
63538   cat >>confdefs.h <<_ACEOF
63539 #define HAVE_FFI_H 1
63540 _ACEOF
63541 
63542             LIBFFI_FOUND=yes
63543             LIBFFI_CFLAGS=
63544             LIBFFI_LIBS=-lffi
63545 
63546 else
63547   LIBFFI_FOUND=no
63548 
63549 fi
63550 
63551 done
63552 
63553     fi
63554     if test "x$LIBFFI_FOUND" = xno; then
63555 
63556   # Print a helpful message on how to acquire the necessary build dependency.
63557   # ffi is the help tag: freetype, cups, alsa etc
63558   MISSING_DEPENDENCY=ffi
63559 
63560   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63561     cygwin_help $MISSING_DEPENDENCY
63562   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63563     msys_help $MISSING_DEPENDENCY
63564   else
63565     PKGHANDLER_COMMAND=
63566 
63567     case $PKGHANDLER in
63568       apt-get)
63569         apt_help     $MISSING_DEPENDENCY ;;
63570       yum)
63571         yum_help     $MISSING_DEPENDENCY ;;
63572       brew)
63573         brew_help    $MISSING_DEPENDENCY ;;
63574       port)
63575         port_help    $MISSING_DEPENDENCY ;;
63576       pkgutil)
63577         pkgutil_help $MISSING_DEPENDENCY ;;
63578       pkgadd)
63579         pkgadd_help  $MISSING_DEPENDENCY ;;
63580     esac
63581 
63582     if test "x$PKGHANDLER_COMMAND" != x; then
63583       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63584     fi
63585   fi
63586 
63587       as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
63588     fi
63589 
63590     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
63591 $as_echo_n "checking if libffi works... " >&6; }
63592     ac_ext=c
63593 ac_cpp='$CPP $CPPFLAGS'
63594 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63595 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63596 ac_compiler_gnu=$ac_cv_c_compiler_gnu
63597 
63598     OLD_CFLAGS="$CFLAGS"
63599     CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
63600     OLD_LIBS="$LIBS"
63601     LIBS="$LIBS $LIBFFI_LIBS"
63602     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63603 /* end confdefs.h.  */
63604 #include <ffi.h>
63605 int
63606 main ()
63607 {
63608 
63609           ffi_call(NULL, NULL, NULL, NULL);
63610           return 0;
63611 
63612   ;
63613   return 0;
63614 }
63615 _ACEOF
63616 if ac_fn_c_try_link "$LINENO"; then :
63617   LIBFFI_WORKS=yes
63618 else
63619   LIBFFI_WORKS=no
63620 
63621 fi
63622 rm -f core conftest.err conftest.$ac_objext \
63623     conftest$ac_exeext conftest.$ac_ext
63624     CFLAGS="$OLD_CFLAGS"
63625     LIBS="$OLD_LIBS"
63626     ac_ext=cpp
63627 ac_cpp='$CXXCPP $CPPFLAGS'
63628 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63629 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63630 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63631 
63632     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
63633 $as_echo "$LIBFFI_WORKS" >&6; }
63634 
63635     if test "x$LIBFFI_WORKS" = xno; then
63636 
63637   # Print a helpful message on how to acquire the necessary build dependency.
63638   # ffi is the help tag: freetype, cups, alsa etc
63639   MISSING_DEPENDENCY=ffi
63640 
63641   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63642     cygwin_help $MISSING_DEPENDENCY
63643   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63644     msys_help $MISSING_DEPENDENCY
63645   else
63646     PKGHANDLER_COMMAND=
63647 
63648     case $PKGHANDLER in
63649       apt-get)
63650         apt_help     $MISSING_DEPENDENCY ;;
63651       yum)
63652         yum_help     $MISSING_DEPENDENCY ;;
63653       brew)
63654         brew_help    $MISSING_DEPENDENCY ;;
63655       port)
63656         port_help    $MISSING_DEPENDENCY ;;
63657       pkgutil)
63658         pkgutil_help $MISSING_DEPENDENCY ;;
63659       pkgadd)
63660         pkgadd_help  $MISSING_DEPENDENCY ;;
63661     esac
63662 
63663     if test "x$PKGHANDLER_COMMAND" != x; then
63664       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63665     fi
63666   fi
63667 
63668       as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
63669     fi
63670 
63671     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi should be bundled" >&5
63672 $as_echo_n "checking if libffi should be bundled... " >&6; }
63673     if test "x$enable_libffi_bundling" = "x"; then
63674       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63675 $as_echo "no" >&6; }
63676       ENABLE_LIBFFI_BUNDLING=false
63677     elif  test "x$enable_libffi_bundling" = "xno"; then
63678       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63679 $as_echo "no, forced" >&6; }
63680       ENABLE_LIBFFI_BUNDLING=false
63681     elif  test "x$enable_libffi_bundling" = "xyes"; then
63682       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63683 $as_echo "yes, forced" >&6; }
63684       ENABLE_LIBFFI_BUNDLING=true
63685     else
63686       as_fn_error $? "Invalid value for --enable-libffi-bundling" "$LINENO" 5
63687     fi
63688 
63689     # Find the libffi.so.X to bundle
63690     if test "x${ENABLE_LIBFFI_BUNDLING}" = "xtrue"; then
63691       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libffi lib file location" >&5
63692 $as_echo_n "checking for libffi lib file location... " >&6; }
63693       if test "x${LIBFFI_LIB_PATH}" != x; then
63694         if test -e ${LIBFFI_LIB_PATH}/libffi.so.?; then
63695           LIBFFI_LIB_FILE="${LIBFFI_LIB_PATH}/libffi.so.?"
63696         else
63697           as_fn_error $? "Could not locate libffi.so.? for bundling in ${LIBFFI_LIB_PATH}" "$LINENO" 5
63698         fi
63699       else
63700         # If we don't have an explicit path, look in a few obvious places
63701         if test "x${OPENJDK_TARGET_CPU}" = "xx86"; then
63702           if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
63703             LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
63704           elif test -e ${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.? ; then
63705             LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.?"
63706           else
63707             as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
63708           fi
63709         elif test "x${OPENJDK_TARGET_CPU}" = "xx86_64"; then
63710           if test -e ${SYSROOT}/usr/lib64/libffi.so.? ; then
63711             LIBFFI_LIB_FILE="${SYSROOT}/usr/lib64/libffi.so.?"
63712           elif test -e ${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.? ; then
63713             LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.?"
63714           else
63715             as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
63716           fi
63717         else
63718           # Fallback on the default /usr/lib dir
63719           if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
63720             LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
63721           else
63722             as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
63723           fi
63724         fi
63725       fi
63726       # Make sure the wildcard is evaluated
63727       LIBFFI_LIB_FILE="$(ls ${LIBFFI_LIB_FILE})"
63728       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBFFI_LIB_FILE}" >&5
63729 $as_echo "${LIBFFI_LIB_FILE}" >&6; }
63730     fi
63731   fi
63732 
63733 
63734 
63735 
63736 
63737 
63738 
63739   if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
63740     # Extract the first word of "llvm-config", so it can be a program name with args.
63741 set dummy llvm-config; ac_word=$2
63742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
63743 $as_echo_n "checking for $ac_word... " >&6; }
63744 if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
63745   $as_echo_n "(cached) " >&6
63746 else
63747   if test -n "$LLVM_CONFIG"; then
63748   ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
63749 else
63750 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
63751 for as_dir in $PATH
63752 do
63753   IFS=$as_save_IFS
63754   test -z "$as_dir" && as_dir=.
63755     for ac_exec_ext in '' $ac_executable_extensions; do
63756   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
63757     ac_cv_prog_LLVM_CONFIG="llvm-config"
63758     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
63759     break 2
63760   fi
63761 done
63762   done
63763 IFS=$as_save_IFS
63764 
63765 fi
63766 fi
63767 LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
63768 if test -n "$LLVM_CONFIG"; then
63769   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
63770 $as_echo "$LLVM_CONFIG" >&6; }
63771 else
63772   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63773 $as_echo "no" >&6; }
63774 fi
63775 
63776 
63777 
63778     if test "x$LLVM_CONFIG" != xllvm-config; then
63779       as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
63780     fi
63781 
63782     llvm_components="jit mcjit engine nativecodegen native"
63783     unset LLVM_CFLAGS
63784     for flag in $("$LLVM_CONFIG" --cxxflags); do
63785       if echo "${flag}" | grep -q '^-[ID]'; then
63786         if test "${flag}" != "-D_DEBUG" ; then
63787           if test "${LLVM_CFLAGS}" != "" ; then
63788             LLVM_CFLAGS="${LLVM_CFLAGS} "
63789           fi
63790           LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
63791         fi
63792       fi
63793     done
63794     llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
63795     LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
63796 
63797     unset LLVM_LDFLAGS
63798     for flag in $("${LLVM_CONFIG}" --ldflags); do
63799       if echo "${flag}" | grep -q '^-L'; then
63800         if test "${LLVM_LDFLAGS}" != ""; then
63801           LLVM_LDFLAGS="${LLVM_LDFLAGS} "
63802         fi
63803         LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
63804       fi
63805     done
63806 
63807     unset LLVM_LIBS
63808     for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
63809       if echo "${flag}" | grep -q '^-l'; then
63810         if test "${LLVM_LIBS}" != ""; then
63811           LLVM_LIBS="${LLVM_LIBS} "
63812         fi
63813         LLVM_LIBS="${LLVM_LIBS}${flag}"
63814       fi
63815     done
63816 
63817     # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
63818     # always properly detect -ltinfo
63819     LLVM_LIBS="${LLVM_LIBS} -ltinfo"
63820 
63821 
63822 
63823 
63824   fi
63825 
63826 
63827 
63828 # Check whether --with-libjpeg was given.
63829 if test "${with_libjpeg+set}" = set; then :
63830   withval=$with_libjpeg;
63831 fi
63832 
63833 
63834   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
63835 $as_echo_n "checking for which libjpeg to use... " >&6; }
63836   # default is bundled
63837   DEFAULT_LIBJPEG=bundled
63838   # if user didn't specify, use DEFAULT_LIBJPEG
63839   if test "x${with_libjpeg}" = "x"; then
63840     with_libjpeg=${DEFAULT_LIBJPEG}
63841   fi
63842   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
63843 $as_echo "${with_libjpeg}" >&6; }
63844 
63845   if test "x${with_libjpeg}" = "xbundled"; then
63846     USE_EXTERNAL_LIBJPEG=false
63847   elif test "x${with_libjpeg}" = "xsystem"; then
63848     ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
63849 if test "x$ac_cv_header_jpeglib_h" = xyes; then :
63850 
63851 else
63852    as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
63853 fi
63854 
63855 
63856     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
63857 $as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
63858 if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
63859   $as_echo_n "(cached) " >&6
63860 else
63861   ac_check_lib_save_LIBS=$LIBS
63862 LIBS="-ljpeg  $LIBS"
63863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63864 /* end confdefs.h.  */
63865 
63866 /* Override any GCC internal prototype to avoid an error.
63867    Use char because int might match the return type of a GCC
63868    builtin and then its argument prototype would still apply.  */
63869 #ifdef __cplusplus
63870 extern "C"
63871 #endif
63872 char jpeg_CreateDecompress ();
63873 int
63874 main ()
63875 {
63876 return jpeg_CreateDecompress ();
63877   ;
63878   return 0;
63879 }
63880 _ACEOF
63881 if ac_fn_cxx_try_link "$LINENO"; then :
63882   ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
63883 else
63884   ac_cv_lib_jpeg_jpeg_CreateDecompress=no
63885 fi
63886 rm -f core conftest.err conftest.$ac_objext \
63887     conftest$ac_exeext conftest.$ac_ext
63888 LIBS=$ac_check_lib_save_LIBS
63889 fi
63890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
63891 $as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
63892 if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
63893   cat >>confdefs.h <<_ACEOF
63894 #define HAVE_LIBJPEG 1
63895 _ACEOF
63896 
63897   LIBS="-ljpeg $LIBS"
63898 
63899 else
63900    as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
63901 fi
63902 
63903 
63904     USE_EXTERNAL_LIBJPEG=true
63905   else
63906     as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
63907   fi
63908 
63909 
63910 
63911 
63912 
63913 # Check whether --with-giflib was given.
63914 if test "${with_giflib+set}" = set; then :
63915   withval=$with_giflib;
63916 fi
63917 
63918 
63919   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
63920 $as_echo_n "checking for which giflib to use... " >&6; }
63921   # default is bundled
63922   DEFAULT_GIFLIB=bundled
63923   # if user didn't specify, use DEFAULT_GIFLIB
63924   if test "x${with_giflib}" = "x"; then
63925     with_giflib=${DEFAULT_GIFLIB}
63926   fi
63927   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
63928 $as_echo "${with_giflib}" >&6; }
63929 
63930   if test "x${with_giflib}" = "xbundled"; then
63931     USE_EXTERNAL_LIBGIF=false
63932   elif test "x${with_giflib}" = "xsystem"; then
63933     ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
63934 if test "x$ac_cv_header_gif_lib_h" = xyes; then :
63935 
63936 else
63937    as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
63938 fi
63939 
63940 
63941     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
63942 $as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
63943 if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
63944   $as_echo_n "(cached) " >&6
63945 else
63946   ac_check_lib_save_LIBS=$LIBS
63947 LIBS="-lgif  $LIBS"
63948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63949 /* end confdefs.h.  */
63950 
63951 /* Override any GCC internal prototype to avoid an error.
63952    Use char because int might match the return type of a GCC
63953    builtin and then its argument prototype would still apply.  */
63954 #ifdef __cplusplus
63955 extern "C"
63956 #endif
63957 char DGifGetCode ();
63958 int
63959 main ()
63960 {
63961 return DGifGetCode ();
63962   ;
63963   return 0;
63964 }
63965 _ACEOF
63966 if ac_fn_cxx_try_link "$LINENO"; then :
63967   ac_cv_lib_gif_DGifGetCode=yes
63968 else
63969   ac_cv_lib_gif_DGifGetCode=no
63970 fi
63971 rm -f core conftest.err conftest.$ac_objext \
63972     conftest$ac_exeext conftest.$ac_ext
63973 LIBS=$ac_check_lib_save_LIBS
63974 fi
63975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
63976 $as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
63977 if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
63978   cat >>confdefs.h <<_ACEOF
63979 #define HAVE_LIBGIF 1
63980 _ACEOF
63981 
63982   LIBS="-lgif $LIBS"
63983 
63984 else
63985    as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
63986 fi
63987 
63988 
63989     USE_EXTERNAL_LIBGIF=true
63990   else
63991     as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
63992   fi
63993 
63994 
63995 
63996 
63997 
63998 # Check whether --with-libpng was given.
63999 if test "${with_libpng+set}" = set; then :
64000   withval=$with_libpng;
64001 fi
64002 
64003 
64004   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
64005 $as_echo_n "checking for which libpng to use... " >&6; }
64006 
64007   # default is bundled
64008   DEFAULT_LIBPNG=bundled
64009   # if user didn't specify, use DEFAULT_LIBPNG
64010   if test "x${with_libpng}" = "x"; then
64011     with_libpng=${DEFAULT_LIBPNG}
64012   fi
64013 
64014   if test "x${with_libpng}" = "xbundled"; then
64015     USE_EXTERNAL_LIBPNG=false
64016     PNG_CFLAGS=""
64017     PNG_LIBS=""
64018     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
64019 $as_echo "bundled" >&6; }
64020   elif test "x${with_libpng}" = "xsystem"; then
64021 
64022 pkg_failed=no
64023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
64024 $as_echo_n "checking for PNG... " >&6; }
64025 
64026 if test -n "$PNG_CFLAGS"; then
64027     pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
64028  elif test -n "$PKG_CONFIG"; then
64029     if test -n "$PKG_CONFIG" && \
64030     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
64031   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
64032   ac_status=$?
64033   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64034   test $ac_status = 0; }; then
64035   pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
64036 else
64037   pkg_failed=yes
64038 fi
64039  else
64040     pkg_failed=untried
64041 fi
64042 if test -n "$PNG_LIBS"; then
64043     pkg_cv_PNG_LIBS="$PNG_LIBS"
64044  elif test -n "$PKG_CONFIG"; then
64045     if test -n "$PKG_CONFIG" && \
64046     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
64047   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
64048   ac_status=$?
64049   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64050   test $ac_status = 0; }; then
64051   pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
64052 else
64053   pkg_failed=yes
64054 fi
64055  else
64056     pkg_failed=untried
64057 fi
64058 
64059 
64060 
64061 if test $pkg_failed = yes; then
64062 
64063 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64064         _pkg_short_errors_supported=yes
64065 else
64066         _pkg_short_errors_supported=no
64067 fi
64068         if test $_pkg_short_errors_supported = yes; then
64069                 PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
64070         else
64071                 PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
64072         fi
64073         # Put the nasty error message in config.log where it belongs
64074         echo "$PNG_PKG_ERRORS" >&5
64075 
64076         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64077 $as_echo "no" >&6; }
64078                 LIBPNG_FOUND=no
64079 elif test $pkg_failed = untried; then
64080         LIBPNG_FOUND=no
64081 else
64082         PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
64083         PNG_LIBS=$pkg_cv_PNG_LIBS
64084         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64085 $as_echo "yes" >&6; }
64086         LIBPNG_FOUND=yes
64087 fi
64088     if test "x${LIBPNG_FOUND}" = "xyes"; then
64089       # PKG_CHECK_MODULES will set PNG_CFLAGS and PNG_LIBS
64090       USE_EXTERNAL_LIBPNG=true
64091       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
64092 $as_echo "system" >&6; }
64093     else
64094       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
64095 $as_echo "system not found" >&6; }
64096       as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
64097     fi
64098   else
64099     as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
64100   fi
64101 
64102 
64103 
64104 
64105 
64106 
64107 
64108 # Check whether --with-zlib was given.
64109 if test "${with_zlib+set}" = set; then :
64110   withval=$with_zlib;
64111 fi
64112 
64113 
64114   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
64115 $as_echo_n "checking for compress in -lz... " >&6; }
64116 if ${ac_cv_lib_z_compress+:} false; then :
64117   $as_echo_n "(cached) " >&6
64118 else
64119   ac_check_lib_save_LIBS=$LIBS
64120 LIBS="-lz  $LIBS"
64121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64122 /* end confdefs.h.  */
64123 
64124 /* Override any GCC internal prototype to avoid an error.
64125    Use char because int might match the return type of a GCC
64126    builtin and then its argument prototype would still apply.  */
64127 #ifdef __cplusplus
64128 extern "C"
64129 #endif
64130 char compress ();
64131 int
64132 main ()
64133 {
64134 return compress ();
64135   ;
64136   return 0;
64137 }
64138 _ACEOF
64139 if ac_fn_cxx_try_link "$LINENO"; then :
64140   ac_cv_lib_z_compress=yes
64141 else
64142   ac_cv_lib_z_compress=no
64143 fi
64144 rm -f core conftest.err conftest.$ac_objext \
64145     conftest$ac_exeext conftest.$ac_ext
64146 LIBS=$ac_check_lib_save_LIBS
64147 fi
64148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
64149 $as_echo "$ac_cv_lib_z_compress" >&6; }
64150 if test "x$ac_cv_lib_z_compress" = xyes; then :
64151    ZLIB_FOUND=yes
64152 else
64153    ZLIB_FOUND=no
64154 fi
64155 
64156 
64157   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
64158 $as_echo_n "checking for which zlib to use... " >&6; }
64159 
64160   DEFAULT_ZLIB=system
64161   if test "x$OPENJDK_TARGET_OS" = xwindows; then
64162     # On windows default is bundled...on others default is system
64163     DEFAULT_ZLIB=bundled
64164   fi
64165 
64166   if test "x${ZLIB_FOUND}" != "xyes"; then
64167     # If we don't find any system...set default to bundled
64168     DEFAULT_ZLIB=bundled
64169   fi
64170 
64171   # If user didn't specify, use DEFAULT_ZLIB
64172   if test "x${with_zlib}" = "x"; then
64173     with_zlib=${DEFAULT_ZLIB}
64174   fi
64175 
64176   if test "x${with_zlib}" = "xbundled"; then
64177     USE_EXTERNAL_LIBZ=false
64178     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
64179 $as_echo "bundled" >&6; }
64180   elif test "x${with_zlib}" = "xsystem"; then
64181     if test "x${ZLIB_FOUND}" = "xyes"; then
64182       USE_EXTERNAL_LIBZ=true
64183       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
64184 $as_echo "system" >&6; }
64185     else
64186       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
64187 $as_echo "system not found" >&6; }
64188       as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
64189     fi
64190   else
64191     as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
64192   fi
64193 
64194 
64195 
64196 
64197 
64198 # Check whether --with-lcms was given.
64199 if test "${with_lcms+set}" = set; then :
64200   withval=$with_lcms;
64201 fi
64202 
64203 
64204   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
64205 $as_echo_n "checking for which lcms to use... " >&6; }
64206 
64207   DEFAULT_LCMS=bundled
64208   # If user didn't specify, use DEFAULT_LCMS
64209   if test "x${with_lcms}" = "x"; then
64210     with_lcms=${DEFAULT_LCMS}
64211   fi
64212 
64213   if test "x${with_lcms}" = "xbundled"; then
64214     USE_EXTERNAL_LCMS=false
64215     LCMS_CFLAGS=""
64216     LCMS_LIBS=""
64217     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
64218 $as_echo "bundled" >&6; }
64219   elif test "x${with_lcms}" = "xsystem"; then
64220     { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
64221 $as_echo "system" >&6; }
64222 
64223 pkg_failed=no
64224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
64225 $as_echo_n "checking for LCMS... " >&6; }
64226 
64227 if test -n "$LCMS_CFLAGS"; then
64228     pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
64229  elif test -n "$PKG_CONFIG"; then
64230     if test -n "$PKG_CONFIG" && \
64231     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
64232   ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
64233   ac_status=$?
64234   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64235   test $ac_status = 0; }; then
64236   pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
64237 else
64238   pkg_failed=yes
64239 fi
64240  else
64241     pkg_failed=untried
64242 fi
64243 if test -n "$LCMS_LIBS"; then
64244     pkg_cv_LCMS_LIBS="$LCMS_LIBS"
64245  elif test -n "$PKG_CONFIG"; then
64246     if test -n "$PKG_CONFIG" && \
64247     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
64248   ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
64249   ac_status=$?
64250   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64251   test $ac_status = 0; }; then
64252   pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
64253 else
64254   pkg_failed=yes
64255 fi
64256  else
64257     pkg_failed=untried
64258 fi
64259 
64260 
64261 
64262 if test $pkg_failed = yes; then
64263 
64264 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64265         _pkg_short_errors_supported=yes
64266 else
64267         _pkg_short_errors_supported=no
64268 fi
64269         if test $_pkg_short_errors_supported = yes; then
64270                 LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
64271         else
64272                 LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
64273         fi
64274         # Put the nasty error message in config.log where it belongs
64275         echo "$LCMS_PKG_ERRORS" >&5
64276 
64277         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64278 $as_echo "no" >&6; }
64279                 LCMS_FOUND=no
64280 elif test $pkg_failed = untried; then
64281         LCMS_FOUND=no
64282 else
64283         LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
64284         LCMS_LIBS=$pkg_cv_LCMS_LIBS
64285         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64286 $as_echo "yes" >&6; }
64287         LCMS_FOUND=yes
64288 fi
64289     if test "x${LCMS_FOUND}" = "xyes"; then
64290       # PKG_CHECK_MODULES will set LCMS_CFLAGS and LCMS_LIBS
64291       USE_EXTERNAL_LCMS=true
64292     else
64293       as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
64294     fi
64295   else
64296     as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
64297   fi
64298 
64299 
64300 
64301 
64302 
64303 
64304 
64305 
64306 
64307 
64308 
64309 
64310 
64311   # Setup libm (the maths library)
64312   if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
64313     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
64314 $as_echo_n "checking for cos in -lm... " >&6; }
64315 if ${ac_cv_lib_m_cos+:} false; then :
64316   $as_echo_n "(cached) " >&6
64317 else
64318   ac_check_lib_save_LIBS=$LIBS
64319 LIBS="-lm  $LIBS"
64320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64321 /* end confdefs.h.  */
64322 
64323 /* Override any GCC internal prototype to avoid an error.
64324    Use char because int might match the return type of a GCC
64325    builtin and then its argument prototype would still apply.  */
64326 #ifdef __cplusplus
64327 extern "C"
64328 #endif
64329 char cos ();
64330 int
64331 main ()
64332 {
64333 return cos ();
64334   ;
64335   return 0;
64336 }
64337 _ACEOF
64338 if ac_fn_cxx_try_link "$LINENO"; then :
64339   ac_cv_lib_m_cos=yes
64340 else
64341   ac_cv_lib_m_cos=no
64342 fi
64343 rm -f core conftest.err conftest.$ac_objext \
64344     conftest$ac_exeext conftest.$ac_ext
64345 LIBS=$ac_check_lib_save_LIBS
64346 fi
64347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
64348 $as_echo "$ac_cv_lib_m_cos" >&6; }
64349 if test "x$ac_cv_lib_m_cos" = xyes; then :
64350   cat >>confdefs.h <<_ACEOF
64351 #define HAVE_LIBM 1
64352 _ACEOF
64353 
64354   LIBS="-lm $LIBS"
64355 
64356 else
64357 
64358         { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
64359 $as_echo "$as_me: Maths library was not found" >&6;}
64360 
64361 fi
64362 
64363     LIBM="-lm"
64364   else
64365     LIBM=""
64366   fi
64367 
64368 
64369   # Setup libdl (for dynamic library loading)
64370   save_LIBS="$LIBS"
64371   LIBS=""
64372   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
64373 $as_echo_n "checking for dlopen in -ldl... " >&6; }
64374 if ${ac_cv_lib_dl_dlopen+:} false; then :
64375   $as_echo_n "(cached) " >&6
64376 else
64377   ac_check_lib_save_LIBS=$LIBS
64378 LIBS="-ldl  $LIBS"
64379 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64380 /* end confdefs.h.  */
64381 
64382 /* Override any GCC internal prototype to avoid an error.
64383    Use char because int might match the return type of a GCC
64384    builtin and then its argument prototype would still apply.  */
64385 #ifdef __cplusplus
64386 extern "C"
64387 #endif
64388 char dlopen ();
64389 int
64390 main ()
64391 {
64392 return dlopen ();
64393   ;
64394   return 0;
64395 }
64396 _ACEOF
64397 if ac_fn_cxx_try_link "$LINENO"; then :
64398   ac_cv_lib_dl_dlopen=yes
64399 else
64400   ac_cv_lib_dl_dlopen=no
64401 fi
64402 rm -f core conftest.err conftest.$ac_objext \
64403     conftest$ac_exeext conftest.$ac_ext
64404 LIBS=$ac_check_lib_save_LIBS
64405 fi
64406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
64407 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
64408 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
64409   cat >>confdefs.h <<_ACEOF
64410 #define HAVE_LIBDL 1
64411 _ACEOF
64412 
64413   LIBS="-ldl $LIBS"
64414 
64415 fi
64416 
64417   LIBDL="$LIBS"
64418 
64419   LIBS="$save_LIBS"
64420 
64421   # Deprecated libraries, keep the flags for backwards compatibility
64422   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
64423 
64424 
64425 # Check whether --with-dxsdk was given.
64426 if test "${with_dxsdk+set}" = set; then :
64427   withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
64428 $as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
64429 fi
64430 
64431 
64432 
64433 
64434 # Check whether --with-dxsdk-lib was given.
64435 if test "${with_dxsdk_lib+set}" = set; then :
64436   withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
64437 $as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
64438 fi
64439 
64440 
64441 
64442 
64443 # Check whether --with-dxsdk-include was given.
64444 if test "${with_dxsdk_include+set}" = set; then :
64445   withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
64446 $as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
64447 fi
64448 
64449 
64450   fi
64451 
64452   # Control if libzip can use mmap. Available for purposes of overriding.
64453   LIBZIP_CAN_USE_MMAP=true
64454 
64455 
64456 
64457   if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
64458     # Find the root of the Solaris Studio installation from the compiler path
64459     SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
64460     STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
64461     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
64462 $as_echo_n "checking for libstlport.so.1... " >&6; }
64463     if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
64464       # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
64465       STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
64466     fi
64467     if test -f "$STLPORT_LIB"; then
64468       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
64469 $as_echo "yes, $STLPORT_LIB" >&6; }
64470 
64471   # Only process if variable expands to non-empty
64472 
64473   if test "x$STLPORT_LIB" != x; then
64474     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64475 
64476   # Input might be given as Windows format, start by converting to
64477   # unix format.
64478   path="$STLPORT_LIB"
64479   new_path=`$CYGPATH -u "$path"`
64480 
64481   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
64482   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
64483   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
64484   # "foo.exe" is OK but "foo" is an error.
64485   #
64486   # This test is therefore slightly more accurate than "test -f" to check for file precense.
64487   # It is also a way to make sure we got the proper file name for the real test later on.
64488   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
64489   if test "x$test_shortpath" = x; then
64490     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
64491 $as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
64492     as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
64493   fi
64494 
64495   # Call helper function which possibly converts this using DOS-style short mode.
64496   # If so, the updated path is stored in $new_path.
64497 
64498   input_path="$new_path"
64499   # Check if we need to convert this using DOS-style short mode. If the path
64500   # contains just simple characters, use it. Otherwise (spaces, weird characters),
64501   # take no chances and rewrite it.
64502   # Note: m4 eats our [], so we need to use [ and ] instead.
64503   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
64504   if test "x$has_forbidden_chars" != x; then
64505     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64506     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
64507     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
64508     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
64509       # Going to short mode and back again did indeed matter. Since short mode is
64510       # case insensitive, let's make it lowercase to improve readability.
64511       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64512       # Now convert it back to Unix-style (cygpath)
64513       input_path=`$CYGPATH -u "$shortmode_path"`
64514       new_path="$input_path"
64515     fi
64516   fi
64517 
64518   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
64519   if test "x$test_cygdrive_prefix" = x; then
64520     # As a simple fix, exclude /usr/bin since it's not a real path.
64521     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
64522       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
64523       # a path prefixed by /cygdrive for fixpath to work.
64524       new_path="$CYGWIN_ROOT_PATH$input_path"
64525     fi
64526   fi
64527 
64528 
64529   if test "x$path" != "x$new_path"; then
64530     STLPORT_LIB="$new_path"
64531     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
64532 $as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
64533   fi
64534 
64535     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64536 
64537   path="$STLPORT_LIB"
64538   has_colon=`$ECHO $path | $GREP ^.:`
64539   new_path="$path"
64540   if test "x$has_colon" = x; then
64541     # Not in mixed or Windows style, start by that.
64542     new_path=`cmd //c echo $path`
64543   fi
64544 
64545 
64546   input_path="$new_path"
64547   # Check if we need to convert this using DOS-style short mode. If the path
64548   # contains just simple characters, use it. Otherwise (spaces, weird characters),
64549   # take no chances and rewrite it.
64550   # Note: m4 eats our [], so we need to use [ and ] instead.
64551   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
64552   if test "x$has_forbidden_chars" != x; then
64553     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64554     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64555   fi
64556 
64557 
64558   windows_path="$new_path"
64559   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64560     unix_path=`$CYGPATH -u "$windows_path"`
64561     new_path="$unix_path"
64562   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64563     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
64564     new_path="$unix_path"
64565   fi
64566 
64567   if test "x$path" != "x$new_path"; then
64568     STLPORT_LIB="$new_path"
64569     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
64570 $as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
64571   fi
64572 
64573   # Save the first 10 bytes of this path to the storage, so fixpath can work.
64574   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
64575 
64576     else
64577       # We're on a unix platform. Hooray! :)
64578       path="$STLPORT_LIB"
64579       has_space=`$ECHO "$path" | $GREP " "`
64580       if test "x$has_space" != x; then
64581         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
64582 $as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
64583         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
64584       fi
64585 
64586       # Use eval to expand a potential ~
64587       eval path="$path"
64588       if test ! -f "$path" && test ! -d "$path"; then
64589         as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
64590       fi
64591 
64592       if test -d "$path"; then
64593         STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
64594       else
64595         dir="`$DIRNAME "$path"`"
64596         base="`$BASENAME "$path"`"
64597         STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
64598       fi
64599     fi
64600   fi
64601 
64602     else
64603       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
64604 $as_echo "no, not found at $STLPORT_LIB" >&6; }
64605       as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
64606     fi
64607 
64608   fi
64609 
64610 
64611 
64612 # Check whether --with-libelf was given.
64613 if test "${with_libelf+set}" = set; then :
64614   withval=$with_libelf;
64615 fi
64616 
64617 
64618 # Check whether --with-libelf-include was given.
64619 if test "${with_libelf_include+set}" = set; then :
64620   withval=$with_libelf_include;
64621 fi
64622 
64623 
64624 # Check whether --with-libelf-lib was given.
64625 if test "${with_libelf_lib+set}" = set; then :
64626   withval=$with_libelf_lib;
64627 fi
64628 
64629 
64630   if test "x$ENABLE_AOT" = xfalse; then
64631     if (test "x${with_libelf}" != x && test "x${with_libelf}" != xno) || \
64632         (test "x${with_libelf_include}" != x && test "x${with_libelf_include}" != xno) || \
64633         (test "x${with_libelf_lib}" != x && test "x${with_libelf_lib}" != xno); then
64634       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libelf is not used, so --with-libelf[-*] is ignored" >&5
64635 $as_echo "$as_me: WARNING: libelf is not used, so --with-libelf[-*] is ignored" >&2;}
64636     fi
64637     LIBELF_CFLAGS=
64638     LIBELF_LIBS=
64639   else
64640     LIBELF_FOUND=no
64641 
64642     if test "x${with_libelf}" = xno || test "x${with_libelf_include}" = xno || test "x${with_libelf_lib}" = xno; then
64643       ENABLE_AOT="false"
64644       if test "x${enable_aot}" = xyes; then
64645         as_fn_error $? "libelf is explicitly disabled, cannot build AOT. Enable libelf or remove --enable-aot to disable AOT." "$LINENO" 5
64646       fi
64647     else
64648       if test "x${with_libelf}" != x; then
64649         ELF_LIBS="-L${with_libelf}/lib -lelf"
64650         ELF_CFLAGS="-I${with_libelf}/include"
64651         LIBELF_FOUND=yes
64652       fi
64653       if test "x${with_libelf_include}" != x; then
64654         ELF_CFLAGS="-I${with_libelf_include}"
64655         LIBELF_FOUND=yes
64656       fi
64657       if test "x${with_libelf_lib}" != x; then
64658         ELF_LIBS="-L${with_libelf_lib} -lelf"
64659         LIBELF_FOUND=yes
64660       fi
64661       # Do not try pkg-config if we have a sysroot set.
64662       if test "x$SYSROOT" = x; then
64663         if test "x$LIBELF_FOUND" = xno; then
64664           # Figure out ELF_CFLAGS and ELF_LIBS
64665 
64666 pkg_failed=no
64667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF" >&5
64668 $as_echo_n "checking for ELF... " >&6; }
64669 
64670 if test -n "$ELF_CFLAGS"; then
64671     pkg_cv_ELF_CFLAGS="$ELF_CFLAGS"
64672  elif test -n "$PKG_CONFIG"; then
64673     if test -n "$PKG_CONFIG" && \
64674     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libelf\""; } >&5
64675   ($PKG_CONFIG --exists --print-errors "libelf") 2>&5
64676   ac_status=$?
64677   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64678   test $ac_status = 0; }; then
64679   pkg_cv_ELF_CFLAGS=`$PKG_CONFIG --cflags "libelf" 2>/dev/null`
64680 else
64681   pkg_failed=yes
64682 fi
64683  else
64684     pkg_failed=untried
64685 fi
64686 if test -n "$ELF_LIBS"; then
64687     pkg_cv_ELF_LIBS="$ELF_LIBS"
64688  elif test -n "$PKG_CONFIG"; then
64689     if test -n "$PKG_CONFIG" && \
64690     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libelf\""; } >&5
64691   ($PKG_CONFIG --exists --print-errors "libelf") 2>&5
64692   ac_status=$?
64693   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64694   test $ac_status = 0; }; then
64695   pkg_cv_ELF_LIBS=`$PKG_CONFIG --libs "libelf" 2>/dev/null`
64696 else
64697   pkg_failed=yes
64698 fi
64699  else
64700     pkg_failed=untried
64701 fi
64702 
64703 
64704 
64705 if test $pkg_failed = yes; then
64706 
64707 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64708         _pkg_short_errors_supported=yes
64709 else
64710         _pkg_short_errors_supported=no
64711 fi
64712         if test $_pkg_short_errors_supported = yes; then
64713                 ELF_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libelf" 2>&1`
64714         else
64715                 ELF_PKG_ERRORS=`$PKG_CONFIG --print-errors "libelf" 2>&1`
64716         fi
64717         # Put the nasty error message in config.log where it belongs
64718         echo "$ELF_PKG_ERRORS" >&5
64719 
64720         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64721 $as_echo "no" >&6; }
64722                 LIBELF_FOUND=no
64723 elif test $pkg_failed = untried; then
64724         LIBELF_FOUND=no
64725 else
64726         ELF_CFLAGS=$pkg_cv_ELF_CFLAGS
64727         ELF_LIBS=$pkg_cv_ELF_LIBS
64728         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64729 $as_echo "yes" >&6; }
64730         LIBELF_FOUND=yes
64731 fi
64732         fi
64733       fi
64734       if test "x$LIBELF_FOUND" = xno; then
64735         for ac_header in libelf.h
64736 do :
64737   ac_fn_cxx_check_header_mongrel "$LINENO" "libelf.h" "ac_cv_header_libelf_h" "$ac_includes_default"
64738 if test "x$ac_cv_header_libelf_h" = xyes; then :
64739   cat >>confdefs.h <<_ACEOF
64740 #define HAVE_LIBELF_H 1
64741 _ACEOF
64742 
64743               LIBELF_FOUND=yes
64744               ELF_CFLAGS=
64745               ELF_LIBS=-lelf
64746 
64747 else
64748   LIBELF_FOUND=no
64749 
64750 fi
64751 
64752 done
64753 
64754       fi
64755       if test "x$LIBELF_FOUND" = xno; then
64756         ENABLE_AOT="false"
64757 
64758   # Print a helpful message on how to acquire the necessary build dependency.
64759   # elf is the help tag: freetype, cups, alsa etc
64760   MISSING_DEPENDENCY=elf
64761 
64762   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64763     cygwin_help $MISSING_DEPENDENCY
64764   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64765     msys_help $MISSING_DEPENDENCY
64766   else
64767     PKGHANDLER_COMMAND=
64768 
64769     case $PKGHANDLER in
64770       apt-get)
64771         apt_help     $MISSING_DEPENDENCY ;;
64772       yum)
64773         yum_help     $MISSING_DEPENDENCY ;;
64774       brew)
64775         brew_help    $MISSING_DEPENDENCY ;;
64776       port)
64777         port_help    $MISSING_DEPENDENCY ;;
64778       pkgutil)
64779         pkgutil_help $MISSING_DEPENDENCY ;;
64780       pkgadd)
64781         pkgadd_help  $MISSING_DEPENDENCY ;;
64782     esac
64783 
64784     if test "x$PKGHANDLER_COMMAND" != x; then
64785       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64786     fi
64787   fi
64788 
64789         if test "x${enable_aot}" = xyes; then
64790           as_fn_error $? "libelf not found, cannot build AOT. Remove --enable-aot to disable AOT or: $HELP_MSG" "$LINENO" 5
64791         else
64792           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libelf not found, cannot build AOT. $HELP_MSG" >&5
64793 $as_echo "$as_me: WARNING: libelf not found, cannot build AOT. $HELP_MSG" >&2;}
64794         fi
64795       else
64796         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libelf works" >&5
64797 $as_echo_n "checking if libelf works... " >&6; }
64798         ac_ext=c
64799 ac_cpp='$CPP $CPPFLAGS'
64800 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64801 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64802 ac_compiler_gnu=$ac_cv_c_compiler_gnu
64803 
64804         OLD_CFLAGS="$CFLAGS"
64805         CFLAGS="$CFLAGS $ELF_CFLAGS"
64806         OLD_LIBS="$LIBS"
64807         LIBS="$LIBS $ELF_LIBS"
64808         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64809 /* end confdefs.h.  */
64810 #include <libelf.h>
64811 int
64812 main ()
64813 {
64814 
64815               elf_version(0);
64816               return 0;
64817 
64818   ;
64819   return 0;
64820 }
64821 _ACEOF
64822 if ac_fn_c_try_link "$LINENO"; then :
64823   LIBELF_WORKS=yes
64824 else
64825   LIBELF_WORKS=no
64826 
64827 fi
64828 rm -f core conftest.err conftest.$ac_objext \
64829     conftest$ac_exeext conftest.$ac_ext
64830         CFLAGS="$OLD_CFLAGS"
64831         LIBS="$OLD_LIBS"
64832         ac_ext=cpp
64833 ac_cpp='$CXXCPP $CPPFLAGS'
64834 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64835 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64836 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
64837 
64838         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBELF_WORKS" >&5
64839 $as_echo "$LIBELF_WORKS" >&6; }
64840 
64841         if test "x$LIBELF_WORKS" = xno; then
64842           ENABLE_AOT="false"
64843 
64844   # Print a helpful message on how to acquire the necessary build dependency.
64845   # elf is the help tag: freetype, cups, alsa etc
64846   MISSING_DEPENDENCY=elf
64847 
64848   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64849     cygwin_help $MISSING_DEPENDENCY
64850   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64851     msys_help $MISSING_DEPENDENCY
64852   else
64853     PKGHANDLER_COMMAND=
64854 
64855     case $PKGHANDLER in
64856       apt-get)
64857         apt_help     $MISSING_DEPENDENCY ;;
64858       yum)
64859         yum_help     $MISSING_DEPENDENCY ;;
64860       brew)
64861         brew_help    $MISSING_DEPENDENCY ;;
64862       port)
64863         port_help    $MISSING_DEPENDENCY ;;
64864       pkgutil)
64865         pkgutil_help $MISSING_DEPENDENCY ;;
64866       pkgadd)
64867         pkgadd_help  $MISSING_DEPENDENCY ;;
64868     esac
64869 
64870     if test "x$PKGHANDLER_COMMAND" != x; then
64871       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64872     fi
64873   fi
64874 
64875           if test "x$enable_aot" = "xyes"; then
64876             as_fn_error $? "Found libelf but could not link and compile with it. Remove --enable-aot to disable AOT or: $HELP_MSG" "$LINENO" 5
64877           else
64878             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Found libelf but could not link and compile with it. $HELP_MSG" >&5
64879 $as_echo "$as_me: WARNING: Found libelf but could not link and compile with it. $HELP_MSG" >&2;}
64880           fi
64881         fi
64882       fi
64883     fi
64884   fi
64885 
64886 
64887 
64888 
64889 
64890 
64891 
64892 
64893 
64894 
64895 
64896 
64897 
64898 
64899 
64900 
64901 
64902 
64903 # Hotspot setup depends on lib checks (AOT needs libelf).
64904 
64905 
64906   # The user can in some cases supply additional jvm features. For the custom
64907   # variant, this defines the entire variant.
64908 
64909 # Check whether --with-jvm-features was given.
64910 if test "${with_jvm_features+set}" = set; then :
64911   withval=$with_jvm_features;
64912 fi
64913 
64914   if test "x$with_jvm_features" != x; then
64915     { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
64916 $as_echo_n "checking additional JVM features... " >&6; }
64917     JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
64918     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
64919 $as_echo "$JVM_FEATURES" >&6; }
64920   fi
64921 
64922   # Override hotspot cpu definitions for ARM platforms
64923   if test "x$OPENJDK_TARGET_CPU" = xarm; then
64924     HOTSPOT_TARGET_CPU=arm_32
64925     HOTSPOT_TARGET_CPU_DEFINE="ARM32"
64926     JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
64927     JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
64928   elif test "x$OPENJDK_TARGET_CPU" = xaarch64 && test "x$HOTSPOT_TARGET_CPU_PORT" = xarm64; then
64929     HOTSPOT_TARGET_CPU=arm_64
64930     HOTSPOT_TARGET_CPU_ARCH=arm
64931     JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
64932     JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
64933   fi
64934 
64935   # Verify that dependencies are met for explicitly set features.
64936   if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
64937     as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
64938   fi
64939 
64940   if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
64941     as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
64942   fi
64943 
64944   if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && ! (  [[ " $JVM_FEATURES " =~ " compiler1 " ]]   ||   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ); then
64945     as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'" "$LINENO" 5
64946   fi
64947 
64948   if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
64949     as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
64950   fi
64951 
64952   if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
64953     as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
64954   fi
64955 
64956   # Turn on additional features based on other parts of configure
64957   if test "x$INCLUDE_DTRACE" = "xtrue"; then
64958     JVM_FEATURES="$JVM_FEATURES dtrace"
64959   else
64960     if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
64961       as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
64962     fi
64963   fi
64964 
64965   if test "x$STATIC_BUILD" = "xtrue"; then
64966     JVM_FEATURES="$JVM_FEATURES static-build"
64967   else
64968     if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
64969       as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
64970     fi
64971   fi
64972 
64973   if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
64974     if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
64975       as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
64976     fi
64977   fi
64978 
64979   if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
64980     if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
64981       as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
64982     fi
64983   fi
64984 
64985   # Only enable jvmci on x86_64, sparcv9 and aarch64.
64986   if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
64987      test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
64988      test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
64989     JVM_FEATURES_jvmci="jvmci"
64990   else
64991     JVM_FEATURES_jvmci=""
64992   fi
64993 
64994   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jdk.internal.vm.compiler should be built" >&5
64995 $as_echo_n "checking if jdk.internal.vm.compiler should be built... " >&6; }
64996   if   [[ " $JVM_FEATURES " =~ " graal " ]]  ; then
64997     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64998 $as_echo "yes, forced" >&6; }
64999     if test "x$JVM_FEATURES_jvmci" != "xjvmci" ; then
65000       as_fn_error $? "Specified JVM feature 'graal' requires feature 'jvmci'" "$LINENO" 5
65001     fi
65002     INCLUDE_GRAAL="true"
65003   else
65004     # By default enable graal build where AOT is available
65005     if test "x$ENABLE_AOT" = "xtrue"; then
65006       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65007 $as_echo "yes" >&6; }
65008       JVM_FEATURES_graal="graal"
65009       INCLUDE_GRAAL="true"
65010     else
65011       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65012 $as_echo "no" >&6; }
65013       JVM_FEATURES_graal=""
65014       INCLUDE_GRAAL="false"
65015     fi
65016   fi
65017 
65018 
65019 
65020   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
65021 $as_echo_n "checking if aot should be enabled... " >&6; }
65022   if test "x$ENABLE_AOT" = "xtrue"; then
65023     if test "x$enable_aot" = "xyes"; then
65024       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65025 $as_echo "yes, forced" >&6; }
65026     else
65027       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65028 $as_echo "yes" >&6; }
65029     fi
65030     JVM_FEATURES_aot="aot"
65031   else
65032     if test "x$enable_aot" = "xno"; then
65033       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65034 $as_echo "no, forced" >&6; }
65035     else
65036       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65037 $as_echo "no" >&6; }
65038     fi
65039     JVM_FEATURES_aot=""
65040   fi
65041 
65042   if test "x$OPENJDK_TARGET_CPU" = xarm ; then
65043     # Default to use link time optimizations on minimal on arm
65044     JVM_FEATURES_link_time_opt="link-time-opt"
65045   else
65046     JVM_FEATURES_link_time_opt=""
65047   fi
65048 
65049   # All variants but minimal (and custom) get these features
65050   NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
65051 
65052   # Enable features depending on variant.
65053   JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci $JVM_FEATURES_aot $JVM_FEATURES_graal"
65054   JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
65055   JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
65056   JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES $JVM_FEATURES_link_time_opt"
65057   JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
65058   JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
65059   JVM_FEATURES_custom="$JVM_FEATURES"
65060 
65061 
65062 
65063 
65064 
65065 
65066 
65067 
65068 
65069   # Used for verification of Makefiles by check-jvm-feature
65070 
65071 
65072   # We don't support --with-jvm-interpreter anymore, use zero instead.
65073 
65074 
65075 # Check whether --with-jvm-interpreter was given.
65076 if test "${with_jvm_interpreter+set}" = set; then :
65077   withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
65078 $as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
65079 fi
65080 
65081 
65082 
65083 
65084 ###############################################################################
65085 #
65086 # We need to do some final tweaking, when everything else is done.
65087 #
65088 ###############################################################################
65089 
65090 
65091   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
65092 $as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
65093 
65094   if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
65095     ENABLE_INTREE_EC=true
65096     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65097 $as_echo "yes" >&6; }
65098   else
65099     ENABLE_INTREE_EC=false
65100     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65101 $as_echo "no" >&6; }
65102   fi
65103 
65104 
65105 
65106 
65107   # Check whether --enable-jtreg-failure-handler was given.
65108 if test "${enable_jtreg_failure_handler+set}" = set; then :
65109   enableval=$enable_jtreg_failure_handler;
65110 fi
65111 
65112 
65113   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
65114 $as_echo_n "checking if jtreg failure handler should be built... " >&6; }
65115 
65116   if test "x$enable_jtreg_failure_handler" = "xyes"; then
65117     if test "x$JT_HOME" = "x"; then
65118       as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
65119     else
65120       BUILD_FAILURE_HANDLER=true
65121       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65122 $as_echo "yes, forced" >&6; }
65123     fi
65124   elif test "x$enable_jtreg_failure_handler" = "xno"; then
65125     BUILD_FAILURE_HANDLER=false
65126     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65127 $as_echo "no, forced" >&6; }
65128   elif test "x$enable_jtreg_failure_handler" = "xauto" \
65129       || test "x$enable_jtreg_failure_handler" = "x"; then
65130     if test "x$JT_HOME" = "x"; then
65131       BUILD_FAILURE_HANDLER=false
65132       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
65133 $as_echo "no, missing jtreg" >&6; }
65134     else
65135       BUILD_FAILURE_HANDLER=true
65136       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
65137 $as_echo "yes, jtreg present" >&6; }
65138     fi
65139   else
65140     as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
65141   fi
65142 
65143 
65144 
65145 
65146   # Check whether --enable-generate-classlist was given.
65147 if test "${enable_generate_classlist+set}" = set; then :
65148   enableval=$enable_generate_classlist;
65149 fi
65150 
65151 
65152   # Check if it's likely that it's possible to generate the classlist. Depending
65153   # on exact jvm configuration it could be possible anyway.
65154   if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
65155     ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
65156   else
65157     ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
65158   fi
65159 
65160   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
65161 $as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
65162   if test "x$enable_generate_classlist" = "xyes"; then
65163     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65164 $as_echo "yes, forced" >&6; }
65165     ENABLE_GENERATE_CLASSLIST="true"
65166     if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
65167       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5
65168 $as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;}
65169     fi
65170   elif test "x$enable_generate_classlist" = "xno"; then
65171     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65172 $as_echo "no, forced" >&6; }
65173     ENABLE_GENERATE_CLASSLIST="false"
65174   elif test "x$enable_generate_classlist" = "x"; then
65175     if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
65176       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65177 $as_echo "yes" >&6; }
65178       ENABLE_GENERATE_CLASSLIST="true"
65179     else
65180       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65181 $as_echo "no" >&6; }
65182       ENABLE_GENERATE_CLASSLIST="false"
65183     fi
65184   else
65185     as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
65186   fi
65187 
65188 
65189 
65190 
65191 ###############################################################################
65192 #
65193 # Configure parts of the build that only affect the build performance,
65194 # not the result.
65195 #
65196 ###############################################################################
65197 
65198 
65199   # How many cores do we have on this build system?
65200 
65201 # Check whether --with-num-cores was given.
65202 if test "${with_num_cores+set}" = set; then :
65203   withval=$with_num_cores;
65204 fi
65205 
65206   if test "x$with_num_cores" = x; then
65207     # The number of cores were not specified, try to probe them.
65208 
65209   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
65210 $as_echo_n "checking for number of cores... " >&6; }
65211   NUM_CORES=1
65212   FOUND_CORES=no
65213 
65214   if test -f /proc/cpuinfo; then
65215     # Looks like a Linux (or cygwin) system
65216     NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
65217     FOUND_CORES=yes
65218   elif test -x /usr/sbin/psrinfo; then
65219     # Looks like a Solaris system
65220     NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
65221     FOUND_CORES=yes
65222   elif test -x /usr/sbin/sysctl; then
65223     # Looks like a MacOSX system
65224     NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
65225     FOUND_CORES=yes
65226   elif test "x$OPENJDK_BUILD_OS" = xaix ; then
65227     NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
65228     FOUND_CORES=yes
65229   elif test -n "$NUMBER_OF_PROCESSORS"; then
65230     # On windows, look in the env
65231     NUM_CORES=$NUMBER_OF_PROCESSORS
65232     FOUND_CORES=yes
65233   fi
65234 
65235   if test "x$FOUND_CORES" = xyes; then
65236     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
65237 $as_echo "$NUM_CORES" >&6; }
65238   else
65239     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
65240 $as_echo "could not detect number of cores, defaulting to 1" >&6; }
65241     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
65242 $as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
65243   fi
65244 
65245   else
65246     NUM_CORES=$with_num_cores
65247   fi
65248 
65249 
65250 
65251   # How much memory do we have on this build system?
65252 
65253 # Check whether --with-memory-size was given.
65254 if test "${with_memory_size+set}" = set; then :
65255   withval=$with_memory_size;
65256 fi
65257 
65258   if test "x$with_memory_size" = x; then
65259     # The memory size was not specified, try to probe it.
65260 
65261   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
65262 $as_echo_n "checking for memory size... " >&6; }
65263   # Default to 1024 MB
65264   MEMORY_SIZE=1024
65265   FOUND_MEM=no
65266 
65267   if test -f /proc/meminfo; then
65268     # Looks like a Linux (or cygwin) system
65269     MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
65270     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
65271     FOUND_MEM=yes
65272   elif test -x /usr/sbin/prtconf; then
65273     # Looks like a Solaris or AIX system
65274     MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
65275     FOUND_MEM=yes
65276   elif test -x /usr/sbin/sysctl; then
65277     # Looks like a MacOSX system
65278     MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
65279     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
65280     FOUND_MEM=yes
65281   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
65282     # Windows, but without cygwin
65283     MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
65284     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
65285     FOUND_MEM=yes
65286   fi
65287 
65288   if test "x$FOUND_MEM" = xyes; then
65289     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
65290 $as_echo "$MEMORY_SIZE MB" >&6; }
65291   else
65292     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
65293 $as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
65294     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
65295 $as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
65296   fi
65297 
65298   else
65299     MEMORY_SIZE=$with_memory_size
65300   fi
65301 
65302 
65303 
65304   # Provide a decent default number of parallel jobs for make depending on
65305   # number of cores, amount of memory and machine architecture.
65306 
65307 # Check whether --with-jobs was given.
65308 if test "${with_jobs+set}" = set; then :
65309   withval=$with_jobs;
65310 fi
65311 
65312   if test "x$with_jobs" = x; then
65313     # Number of jobs was not specified, calculate.
65314     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
65315 $as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
65316     # Approximate memory in GB.
65317     memory_gb=`expr $MEMORY_SIZE / 1024`
65318     # Pick the lowest of memory in gb and number of cores.
65319     if test "$memory_gb" -lt "$NUM_CORES"; then
65320       JOBS="$memory_gb"
65321     else
65322       JOBS="$NUM_CORES"
65323     fi
65324     if test "$JOBS" -eq "0"; then
65325       JOBS=1
65326     fi
65327     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
65328 $as_echo "$JOBS" >&6; }
65329   else
65330     JOBS=$with_jobs
65331   fi
65332 
65333 
65334 
65335   # The number of test jobs will be chosen automatically if TEST_JOBS is 0
65336 
65337 # Check whether --with-test-jobs was given.
65338 if test "${with_test_jobs+set}" = set; then :
65339   withval=$with_test_jobs;
65340 fi
65341 
65342   if test "x$with_test_jobs" = x; then
65343       TEST_JOBS=0
65344   else
65345       TEST_JOBS=$with_test_jobs
65346   fi
65347 
65348 
65349 
65350 # Setup arguments for the boot jdk (after cores and memory have been setup)
65351 
65352   ##############################################################################
65353   #
65354   # Specify jvm options for anything that is run with the Boot JDK.
65355   # Not all JVM:s accept the same arguments on the command line.
65356   #
65357 
65358 # Check whether --with-boot-jdk-jvmargs was given.
65359 if test "${with_boot_jdk_jvmargs+set}" = set; then :
65360   withval=$with_boot_jdk_jvmargs;
65361 fi
65362 
65363 
65364   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
65365 $as_echo_n "checking flags for boot jdk java command ... " >&6; }
65366 
65367   # Disable special log output when a debug build is used as Boot JDK...
65368 
65369   $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
65370   $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
65371   OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
65372   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65373   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65374   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65375     boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
65376     JVM_ARG_OK=true
65377   else
65378     $ECHO "Arg failed:" >&5
65379     $ECHO "$OUTPUT" >&5
65380     JVM_ARG_OK=false
65381   fi
65382 
65383 
65384   # Force en-US environment
65385 
65386   $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
65387   $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
65388   OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
65389   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65390   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65391   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65392     boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
65393     JVM_ARG_OK=true
65394   else
65395     $ECHO "Arg failed:" >&5
65396     $ECHO "$OUTPUT" >&5
65397     JVM_ARG_OK=false
65398   fi
65399 
65400 
65401   # Apply user provided options.
65402 
65403   $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
65404   $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
65405   OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
65406   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65407   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65408   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65409     boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
65410     JVM_ARG_OK=true
65411   else
65412     $ECHO "Arg failed:" >&5
65413     $ECHO "$OUTPUT" >&5
65414     JVM_ARG_OK=false
65415   fi
65416 
65417 
65418   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
65419 $as_echo "$boot_jdk_jvmargs" >&6; }
65420 
65421   # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
65422   JAVA_FLAGS=$boot_jdk_jvmargs
65423 
65424 
65425 
65426   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
65427 $as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
65428 
65429   # Starting amount of heap memory.
65430 
65431   $ECHO "Check if jvm arg is ok: -Xms64M" >&5
65432   $ECHO "Command: $JAVA -Xms64M -version" >&5
65433   OUTPUT=`$JAVA -Xms64M -version 2>&1`
65434   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65435   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65436   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65437     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
65438     JVM_ARG_OK=true
65439   else
65440     $ECHO "Arg failed:" >&5
65441     $ECHO "$OUTPUT" >&5
65442     JVM_ARG_OK=false
65443   fi
65444 
65445   BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
65446 
65447   # Maximum amount of heap memory and stack size.
65448   JVM_HEAP_LIMIT_32="1024"
65449   # Running a 64 bit JVM allows for and requires a bigger heap
65450   JVM_HEAP_LIMIT_64="1600"
65451   STACK_SIZE_32=768
65452   STACK_SIZE_64=1536
65453   JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
65454   if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
65455     JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
65456   fi
65457   if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
65458     JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
65459   fi
65460   if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
65461     JVM_HEAP_LIMIT_32=512
65462     JVM_HEAP_LIMIT_64=512
65463   fi
65464 
65465   if test "x$BOOT_JDK_BITS" = "x32"; then
65466     STACK_SIZE=$STACK_SIZE_32
65467     JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
65468   else
65469     STACK_SIZE=$STACK_SIZE_64
65470     JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
65471   fi
65472 
65473   $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
65474   $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
65475   OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
65476   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65477   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65478   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65479     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
65480     JVM_ARG_OK=true
65481   else
65482     $ECHO "Arg failed:" >&5
65483     $ECHO "$OUTPUT" >&5
65484     JVM_ARG_OK=false
65485   fi
65486 
65487 
65488   $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
65489   $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
65490   OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
65491   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65492   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65493   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65494     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
65495     JVM_ARG_OK=true
65496   else
65497     $ECHO "Arg failed:" >&5
65498     $ECHO "$OUTPUT" >&5
65499     JVM_ARG_OK=false
65500   fi
65501 
65502 
65503   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
65504 $as_echo "$boot_jdk_jvmargs_big" >&6; }
65505 
65506   JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
65507 
65508 
65509   if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
65510     BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
65511     BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
65512   else
65513     BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
65514     BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
65515   fi
65516   BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
65517   BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
65518   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
65519 $as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
65520   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
65521 $as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
65522 
65523 
65524   # By default, the main javac compilations use big
65525   JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
65526 
65527 
65528   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
65529 $as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
65530 
65531   # Use serial gc for small short lived tools if possible
65532 
65533   $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
65534   $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
65535   OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
65536   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65537   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65538   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65539     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
65540     JVM_ARG_OK=true
65541   else
65542     $ECHO "Arg failed:" >&5
65543     $ECHO "$OUTPUT" >&5
65544     JVM_ARG_OK=false
65545   fi
65546 
65547 
65548   $ECHO "Check if jvm arg is ok: -Xms32M" >&5
65549   $ECHO "Command: $JAVA -Xms32M -version" >&5
65550   OUTPUT=`$JAVA -Xms32M -version 2>&1`
65551   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65552   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65553   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65554     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
65555     JVM_ARG_OK=true
65556   else
65557     $ECHO "Arg failed:" >&5
65558     $ECHO "$OUTPUT" >&5
65559     JVM_ARG_OK=false
65560   fi
65561 
65562 
65563   $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
65564   $ECHO "Command: $JAVA -Xmx512M -version" >&5
65565   OUTPUT=`$JAVA -Xmx512M -version 2>&1`
65566   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65567   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65568   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65569     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
65570     JVM_ARG_OK=true
65571   else
65572     $ECHO "Arg failed:" >&5
65573     $ECHO "$OUTPUT" >&5
65574     JVM_ARG_OK=false
65575   fi
65576 
65577 
65578   $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
65579   $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
65580   OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
65581   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65582   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65583   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65584     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
65585     JVM_ARG_OK=true
65586   else
65587     $ECHO "Arg failed:" >&5
65588     $ECHO "$OUTPUT" >&5
65589     JVM_ARG_OK=false
65590   fi
65591 
65592 
65593   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
65594 $as_echo "$boot_jdk_jvmargs_small" >&6; }
65595 
65596   JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
65597 
65598 
65599   JAVA_TOOL_FLAGS_SMALL=""
65600   for f in $JAVA_FLAGS_SMALL; do
65601     JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
65602   done
65603 
65604 
65605 
65606 # Setup smart javac (after cores and memory have been setup)
65607 
65608 
65609 # Check whether --with-sjavac-server-java was given.
65610 if test "${with_sjavac_server_java+set}" = set; then :
65611   withval=$with_sjavac_server_java;
65612 fi
65613 
65614 
65615   if test "x$with_sjavac_server_java" != x; then
65616     SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
65617     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
65618     if test "x$FOUND_VERSION" = x; then
65619       as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
65620     fi
65621   else
65622     SJAVAC_SERVER_JAVA="$JAVA"
65623   fi
65624 
65625 
65626   if test "$MEMORY_SIZE" -gt "3000"; then
65627 
65628   $ECHO "Check if jvm arg is ok: -d64" >&5
65629   $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
65630   OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
65631   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65632   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65633   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65634     SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
65635     JVM_ARG_OK=true
65636   else
65637     $ECHO "Arg failed:" >&5
65638     $ECHO "$OUTPUT" >&5
65639     JVM_ARG_OK=false
65640   fi
65641 
65642     if test "$JVM_ARG_OK" = true; then
65643       JVM_64BIT=true
65644       JVM_ARG_OK=false
65645     fi
65646   fi
65647 
65648   MX_VALUE=`expr $MEMORY_SIZE / 2`
65649   if test "$JVM_64BIT" = true; then
65650     # Set ms lower than mx since more than one instance of the server might
65651     # get launched at the same time before they figure out which instance won.
65652     MS_VALUE=512
65653     if test "$MX_VALUE" -gt "2048"; then
65654       MX_VALUE=2048
65655     fi
65656   else
65657     MS_VALUE=256
65658     if test "$MX_VALUE" -gt "1500"; then
65659       MX_VALUE=1500
65660     fi
65661   fi
65662   if test "$MX_VALUE" -lt "512"; then
65663     MX_VALUE=512
65664   fi
65665 
65666   $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
65667   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
65668   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
65669   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65670   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65671   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65672     SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
65673     JVM_ARG_OK=true
65674   else
65675     $ECHO "Arg failed:" >&5
65676     $ECHO "$OUTPUT" >&5
65677     JVM_ARG_OK=false
65678   fi
65679 
65680 
65681 
65682   # Check whether --enable-sjavac was given.
65683 if test "${enable_sjavac+set}" = set; then :
65684   enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
65685 else
65686   ENABLE_SJAVAC="no"
65687 fi
65688 
65689   if test "x$JVM_ARG_OK" = "xfalse"; then
65690     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
65691 $as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
65692     ENABLE_SJAVAC="no"
65693   fi
65694   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
65695 $as_echo_n "checking whether to use sjavac... " >&6; }
65696   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
65697 $as_echo "$ENABLE_SJAVAC" >&6; }
65698 
65699 
65700   # Check whether --enable-javac-server was given.
65701 if test "${enable_javac_server+set}" = set; then :
65702   enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
65703 else
65704   ENABLE_JAVAC_SERVER="yes"
65705 fi
65706 
65707   if test "x$JVM_ARG_OK" = "xfalse"; then
65708     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
65709 $as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
65710     ENABLE_JAVAC_SERVER="no"
65711   fi
65712   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
65713 $as_echo_n "checking whether to use javac server... " >&6; }
65714   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
65715 $as_echo "$ENABLE_JAVAC_SERVER" >&6; }
65716 
65717 
65718   if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
65719     # When using a server javac, the small client instances do not need much
65720     # resources.
65721     JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
65722   fi
65723 
65724 
65725 # Setup use of icecc if requested
65726 
65727   # Check whether --enable-icecc was given.
65728 if test "${enable_icecc+set}" = set; then :
65729   enableval=$enable_icecc;
65730 fi
65731 
65732 
65733   if test "x${enable_icecc}" = "xyes"; then
65734 
65735 
65736 
65737   # Publish this variable in the help.
65738 
65739 
65740   if [ -z "${ICECC_CMD+x}" ]; then
65741     # The variable is not set by user, try to locate tool using the code snippet
65742     for ac_prog in icecc
65743 do
65744   # Extract the first word of "$ac_prog", so it can be a program name with args.
65745 set dummy $ac_prog; ac_word=$2
65746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65747 $as_echo_n "checking for $ac_word... " >&6; }
65748 if ${ac_cv_path_ICECC_CMD+:} false; then :
65749   $as_echo_n "(cached) " >&6
65750 else
65751   case $ICECC_CMD in
65752   [\\/]* | ?:[\\/]*)
65753   ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65754   ;;
65755   *)
65756   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65757 for as_dir in $PATH
65758 do
65759   IFS=$as_save_IFS
65760   test -z "$as_dir" && as_dir=.
65761     for ac_exec_ext in '' $ac_executable_extensions; do
65762   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65763     ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65764     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65765     break 2
65766   fi
65767 done
65768   done
65769 IFS=$as_save_IFS
65770 
65771   ;;
65772 esac
65773 fi
65774 ICECC_CMD=$ac_cv_path_ICECC_CMD
65775 if test -n "$ICECC_CMD"; then
65776   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65777 $as_echo "$ICECC_CMD" >&6; }
65778 else
65779   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65780 $as_echo "no" >&6; }
65781 fi
65782 
65783 
65784   test -n "$ICECC_CMD" && break
65785 done
65786 
65787   else
65788     # The variable is set, but is it from the command line or the environment?
65789 
65790     # Try to remove the string !ICECC_CMD! from our list.
65791     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
65792     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65793       # If it failed, the variable was not from the command line. Ignore it,
65794       # but warn the user (except for BASH, which is always set by the calling BASH).
65795       if test "xICECC_CMD" != xBASH; then
65796         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
65797 $as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
65798       fi
65799       # Try to locate tool using the code snippet
65800       for ac_prog in icecc
65801 do
65802   # Extract the first word of "$ac_prog", so it can be a program name with args.
65803 set dummy $ac_prog; ac_word=$2
65804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65805 $as_echo_n "checking for $ac_word... " >&6; }
65806 if ${ac_cv_path_ICECC_CMD+:} false; then :
65807   $as_echo_n "(cached) " >&6
65808 else
65809   case $ICECC_CMD in
65810   [\\/]* | ?:[\\/]*)
65811   ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65812   ;;
65813   *)
65814   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65815 for as_dir in $PATH
65816 do
65817   IFS=$as_save_IFS
65818   test -z "$as_dir" && as_dir=.
65819     for ac_exec_ext in '' $ac_executable_extensions; do
65820   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65821     ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65822     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65823     break 2
65824   fi
65825 done
65826   done
65827 IFS=$as_save_IFS
65828 
65829   ;;
65830 esac
65831 fi
65832 ICECC_CMD=$ac_cv_path_ICECC_CMD
65833 if test -n "$ICECC_CMD"; then
65834   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65835 $as_echo "$ICECC_CMD" >&6; }
65836 else
65837   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65838 $as_echo "no" >&6; }
65839 fi
65840 
65841 
65842   test -n "$ICECC_CMD" && break
65843 done
65844 
65845     else
65846       # If it succeeded, then it was overridden by the user. We will use it
65847       # for the tool.
65848 
65849       # First remove it from the list of overridden variables, so we can test
65850       # for unknown variables in the end.
65851       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65852 
65853       # Check if we try to supply an empty value
65854       if test "x$ICECC_CMD" = x; then
65855         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
65856 $as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
65857         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
65858 $as_echo_n "checking for ICECC_CMD... " >&6; }
65859         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65860 $as_echo "disabled" >&6; }
65861       else
65862         # Check if the provided tool contains a complete path.
65863         tool_specified="$ICECC_CMD"
65864         tool_basename="${tool_specified##*/}"
65865         if test "x$tool_basename" = "x$tool_specified"; then
65866           # A command without a complete path is provided, search $PATH.
65867           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
65868 $as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
65869           # Extract the first word of "$tool_basename", so it can be a program name with args.
65870 set dummy $tool_basename; ac_word=$2
65871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65872 $as_echo_n "checking for $ac_word... " >&6; }
65873 if ${ac_cv_path_ICECC_CMD+:} false; then :
65874   $as_echo_n "(cached) " >&6
65875 else
65876   case $ICECC_CMD in
65877   [\\/]* | ?:[\\/]*)
65878   ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65879   ;;
65880   *)
65881   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65882 for as_dir in $PATH
65883 do
65884   IFS=$as_save_IFS
65885   test -z "$as_dir" && as_dir=.
65886     for ac_exec_ext in '' $ac_executable_extensions; do
65887   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65888     ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65889     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65890     break 2
65891   fi
65892 done
65893   done
65894 IFS=$as_save_IFS
65895 
65896   ;;
65897 esac
65898 fi
65899 ICECC_CMD=$ac_cv_path_ICECC_CMD
65900 if test -n "$ICECC_CMD"; then
65901   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65902 $as_echo "$ICECC_CMD" >&6; }
65903 else
65904   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65905 $as_echo "no" >&6; }
65906 fi
65907 
65908 
65909           if test "x$ICECC_CMD" = x; then
65910             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65911           fi
65912         else
65913           # Otherwise we believe it is a complete path. Use it as it is.
65914           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
65915 $as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
65916           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
65917 $as_echo_n "checking for ICECC_CMD... " >&6; }
65918           if test ! -x "$tool_specified"; then
65919             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65920 $as_echo "not found" >&6; }
65921             as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
65922           fi
65923           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65924 $as_echo "$tool_specified" >&6; }
65925         fi
65926       fi
65927     fi
65928 
65929   fi
65930 
65931 
65932 
65933   if test "x$ICECC_CMD" = x; then
65934     as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
65935   fi
65936 
65937 
65938     old_path="$PATH"
65939 
65940     # Look for icecc-create-env in some known places
65941     PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
65942 
65943 
65944 
65945   # Publish this variable in the help.
65946 
65947 
65948   if [ -z "${ICECC_CREATE_ENV+x}" ]; then
65949     # The variable is not set by user, try to locate tool using the code snippet
65950     for ac_prog in icecc-create-env
65951 do
65952   # Extract the first word of "$ac_prog", so it can be a program name with args.
65953 set dummy $ac_prog; ac_word=$2
65954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65955 $as_echo_n "checking for $ac_word... " >&6; }
65956 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65957   $as_echo_n "(cached) " >&6
65958 else
65959   case $ICECC_CREATE_ENV in
65960   [\\/]* | ?:[\\/]*)
65961   ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65962   ;;
65963   *)
65964   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65965 for as_dir in $PATH
65966 do
65967   IFS=$as_save_IFS
65968   test -z "$as_dir" && as_dir=.
65969     for ac_exec_ext in '' $ac_executable_extensions; do
65970   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65971     ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65972     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65973     break 2
65974   fi
65975 done
65976   done
65977 IFS=$as_save_IFS
65978 
65979   ;;
65980 esac
65981 fi
65982 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65983 if test -n "$ICECC_CREATE_ENV"; then
65984   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65985 $as_echo "$ICECC_CREATE_ENV" >&6; }
65986 else
65987   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65988 $as_echo "no" >&6; }
65989 fi
65990 
65991 
65992   test -n "$ICECC_CREATE_ENV" && break
65993 done
65994 
65995   else
65996     # The variable is set, but is it from the command line or the environment?
65997 
65998     # Try to remove the string !ICECC_CREATE_ENV! from our list.
65999     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
66000     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66001       # If it failed, the variable was not from the command line. Ignore it,
66002       # but warn the user (except for BASH, which is always set by the calling BASH).
66003       if test "xICECC_CREATE_ENV" != xBASH; then
66004         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
66005 $as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
66006       fi
66007       # Try to locate tool using the code snippet
66008       for ac_prog in icecc-create-env
66009 do
66010   # Extract the first word of "$ac_prog", so it can be a program name with args.
66011 set dummy $ac_prog; ac_word=$2
66012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66013 $as_echo_n "checking for $ac_word... " >&6; }
66014 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
66015   $as_echo_n "(cached) " >&6
66016 else
66017   case $ICECC_CREATE_ENV in
66018   [\\/]* | ?:[\\/]*)
66019   ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
66020   ;;
66021   *)
66022   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66023 for as_dir in $PATH
66024 do
66025   IFS=$as_save_IFS
66026   test -z "$as_dir" && as_dir=.
66027     for ac_exec_ext in '' $ac_executable_extensions; do
66028   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66029     ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
66030     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66031     break 2
66032   fi
66033 done
66034   done
66035 IFS=$as_save_IFS
66036 
66037   ;;
66038 esac
66039 fi
66040 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66041 if test -n "$ICECC_CREATE_ENV"; then
66042   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66043 $as_echo "$ICECC_CREATE_ENV" >&6; }
66044 else
66045   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66046 $as_echo "no" >&6; }
66047 fi
66048 
66049 
66050   test -n "$ICECC_CREATE_ENV" && break
66051 done
66052 
66053     else
66054       # If it succeeded, then it was overridden by the user. We will use it
66055       # for the tool.
66056 
66057       # First remove it from the list of overridden variables, so we can test
66058       # for unknown variables in the end.
66059       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66060 
66061       # Check if we try to supply an empty value
66062       if test "x$ICECC_CREATE_ENV" = x; then
66063         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
66064 $as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
66065         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
66066 $as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
66067         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66068 $as_echo "disabled" >&6; }
66069       else
66070         # Check if the provided tool contains a complete path.
66071         tool_specified="$ICECC_CREATE_ENV"
66072         tool_basename="${tool_specified##*/}"
66073         if test "x$tool_basename" = "x$tool_specified"; then
66074           # A command without a complete path is provided, search $PATH.
66075           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
66076 $as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
66077           # Extract the first word of "$tool_basename", so it can be a program name with args.
66078 set dummy $tool_basename; ac_word=$2
66079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66080 $as_echo_n "checking for $ac_word... " >&6; }
66081 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
66082   $as_echo_n "(cached) " >&6
66083 else
66084   case $ICECC_CREATE_ENV in
66085   [\\/]* | ?:[\\/]*)
66086   ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
66087   ;;
66088   *)
66089   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66090 for as_dir in $PATH
66091 do
66092   IFS=$as_save_IFS
66093   test -z "$as_dir" && as_dir=.
66094     for ac_exec_ext in '' $ac_executable_extensions; do
66095   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66096     ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
66097     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66098     break 2
66099   fi
66100 done
66101   done
66102 IFS=$as_save_IFS
66103 
66104   ;;
66105 esac
66106 fi
66107 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66108 if test -n "$ICECC_CREATE_ENV"; then
66109   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66110 $as_echo "$ICECC_CREATE_ENV" >&6; }
66111 else
66112   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66113 $as_echo "no" >&6; }
66114 fi
66115 
66116 
66117           if test "x$ICECC_CREATE_ENV" = x; then
66118             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66119           fi
66120         else
66121           # Otherwise we believe it is a complete path. Use it as it is.
66122           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
66123 $as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
66124           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
66125 $as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
66126           if test ! -x "$tool_specified"; then
66127             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66128 $as_echo "not found" >&6; }
66129             as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
66130           fi
66131           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66132 $as_echo "$tool_specified" >&6; }
66133         fi
66134       fi
66135     fi
66136 
66137   fi
66138 
66139 
66140 
66141   if test "x$ICECC_CREATE_ENV" = x; then
66142     as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
66143   fi
66144 
66145 
66146     # Use icecc-create-env to create a minimal compilation environment that can
66147     # be sent to the other hosts in the icecream cluster.
66148     icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
66149     ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
66150     # Older versions of icecc does not have the --gcc parameter
66151     if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
66152       icecc_gcc_arg="--gcc"
66153     fi
66154     if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
66155 
66156   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66157       && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
66158           ${icecc_create_env_log} 2>&1 )
66159   if test "$?" != "0"; then
66160     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66161 $as_echo "$as_me: icecc-create-env output:" >&6;}
66162     cat \
66163           ${icecc_create_env_log}
66164     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66165   fi
66166 
66167     elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
66168       # For clang, the icecc compilerwrapper is needed. It usually resides next
66169       # to icecc-create-env.
66170 
66171 
66172 
66173   # Publish this variable in the help.
66174 
66175 
66176   if [ -z "${ICECC_WRAPPER+x}" ]; then
66177     # The variable is not set by user, try to locate tool using the code snippet
66178     for ac_prog in compilerwrapper
66179 do
66180   # Extract the first word of "$ac_prog", so it can be a program name with args.
66181 set dummy $ac_prog; ac_word=$2
66182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66183 $as_echo_n "checking for $ac_word... " >&6; }
66184 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
66185   $as_echo_n "(cached) " >&6
66186 else
66187   case $ICECC_WRAPPER in
66188   [\\/]* | ?:[\\/]*)
66189   ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
66190   ;;
66191   *)
66192   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66193 for as_dir in $PATH
66194 do
66195   IFS=$as_save_IFS
66196   test -z "$as_dir" && as_dir=.
66197     for ac_exec_ext in '' $ac_executable_extensions; do
66198   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66199     ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
66200     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66201     break 2
66202   fi
66203 done
66204   done
66205 IFS=$as_save_IFS
66206 
66207   ;;
66208 esac
66209 fi
66210 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
66211 if test -n "$ICECC_WRAPPER"; then
66212   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
66213 $as_echo "$ICECC_WRAPPER" >&6; }
66214 else
66215   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66216 $as_echo "no" >&6; }
66217 fi
66218 
66219 
66220   test -n "$ICECC_WRAPPER" && break
66221 done
66222 
66223   else
66224     # The variable is set, but is it from the command line or the environment?
66225 
66226     # Try to remove the string !ICECC_WRAPPER! from our list.
66227     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
66228     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66229       # If it failed, the variable was not from the command line. Ignore it,
66230       # but warn the user (except for BASH, which is always set by the calling BASH).
66231       if test "xICECC_WRAPPER" != xBASH; then
66232         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
66233 $as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
66234       fi
66235       # Try to locate tool using the code snippet
66236       for ac_prog in compilerwrapper
66237 do
66238   # Extract the first word of "$ac_prog", so it can be a program name with args.
66239 set dummy $ac_prog; ac_word=$2
66240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66241 $as_echo_n "checking for $ac_word... " >&6; }
66242 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
66243   $as_echo_n "(cached) " >&6
66244 else
66245   case $ICECC_WRAPPER in
66246   [\\/]* | ?:[\\/]*)
66247   ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
66248   ;;
66249   *)
66250   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66251 for as_dir in $PATH
66252 do
66253   IFS=$as_save_IFS
66254   test -z "$as_dir" && as_dir=.
66255     for ac_exec_ext in '' $ac_executable_extensions; do
66256   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66257     ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
66258     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66259     break 2
66260   fi
66261 done
66262   done
66263 IFS=$as_save_IFS
66264 
66265   ;;
66266 esac
66267 fi
66268 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
66269 if test -n "$ICECC_WRAPPER"; then
66270   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
66271 $as_echo "$ICECC_WRAPPER" >&6; }
66272 else
66273   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66274 $as_echo "no" >&6; }
66275 fi
66276 
66277 
66278   test -n "$ICECC_WRAPPER" && break
66279 done
66280 
66281     else
66282       # If it succeeded, then it was overridden by the user. We will use it
66283       # for the tool.
66284 
66285       # First remove it from the list of overridden variables, so we can test
66286       # for unknown variables in the end.
66287       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66288 
66289       # Check if we try to supply an empty value
66290       if test "x$ICECC_WRAPPER" = x; then
66291         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
66292 $as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
66293         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
66294 $as_echo_n "checking for ICECC_WRAPPER... " >&6; }
66295         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66296 $as_echo "disabled" >&6; }
66297       else
66298         # Check if the provided tool contains a complete path.
66299         tool_specified="$ICECC_WRAPPER"
66300         tool_basename="${tool_specified##*/}"
66301         if test "x$tool_basename" = "x$tool_specified"; then
66302           # A command without a complete path is provided, search $PATH.
66303           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
66304 $as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
66305           # Extract the first word of "$tool_basename", so it can be a program name with args.
66306 set dummy $tool_basename; ac_word=$2
66307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66308 $as_echo_n "checking for $ac_word... " >&6; }
66309 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
66310   $as_echo_n "(cached) " >&6
66311 else
66312   case $ICECC_WRAPPER in
66313   [\\/]* | ?:[\\/]*)
66314   ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
66315   ;;
66316   *)
66317   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66318 for as_dir in $PATH
66319 do
66320   IFS=$as_save_IFS
66321   test -z "$as_dir" && as_dir=.
66322     for ac_exec_ext in '' $ac_executable_extensions; do
66323   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66324     ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
66325     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66326     break 2
66327   fi
66328 done
66329   done
66330 IFS=$as_save_IFS
66331 
66332   ;;
66333 esac
66334 fi
66335 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
66336 if test -n "$ICECC_WRAPPER"; then
66337   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
66338 $as_echo "$ICECC_WRAPPER" >&6; }
66339 else
66340   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66341 $as_echo "no" >&6; }
66342 fi
66343 
66344 
66345           if test "x$ICECC_WRAPPER" = x; then
66346             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66347           fi
66348         else
66349           # Otherwise we believe it is a complete path. Use it as it is.
66350           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
66351 $as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
66352           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
66353 $as_echo_n "checking for ICECC_WRAPPER... " >&6; }
66354           if test ! -x "$tool_specified"; then
66355             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66356 $as_echo "not found" >&6; }
66357             as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
66358           fi
66359           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66360 $as_echo "$tool_specified" >&6; }
66361         fi
66362       fi
66363     fi
66364 
66365   fi
66366 
66367 
66368 
66369   if test "x$ICECC_WRAPPER" = x; then
66370     as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
66371   fi
66372 
66373 
66374 
66375   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66376       && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
66377   if test "$?" != "0"; then
66378     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66379 $as_echo "$as_me: icecc-create-env output:" >&6;}
66380     cat ${icecc_create_env_log}
66381     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66382   fi
66383 
66384     else
66385       as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
66386     fi
66387     PATH="$old_path"
66388     # The bundle with the compiler gets a name based on checksums. Parse log file
66389     # to find it.
66390     ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
66391     ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
66392     if test ! -f ${ICECC_ENV_BUNDLE}; then
66393       as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
66394     fi
66395     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
66396 $as_echo_n "checking for icecc build environment for target compiler... " >&6; }
66397     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
66398 $as_echo "${ICECC_ENV_BUNDLE}" >&6; }
66399     ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
66400 
66401     if test "x${COMPILE_TYPE}" = "xcross"; then
66402       # If cross compiling, create a separate env package for the build compiler
66403       # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
66404       icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
66405       if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
66406 
66407   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66408       && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
66409             ${icecc_create_env_log_build} 2>&1 )
66410   if test "$?" != "0"; then
66411     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66412 $as_echo "$as_me: icecc-create-env output:" >&6;}
66413     cat \
66414             ${icecc_create_env_log_build}
66415     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66416   fi
66417 
66418       elif test "x${BUILD_CC##*/}" = "xclang"; then
66419 
66420   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66421       && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
66422   if test "$?" != "0"; then
66423     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66424 $as_echo "$as_me: icecc-create-env output:" >&6;}
66425     cat ${icecc_create_env_log_build}
66426     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66427   fi
66428 
66429       else
66430         as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
66431       fi
66432       ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
66433       ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
66434       if test ! -f ${ICECC_ENV_BUNDLE}; then
66435         as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
66436       fi
66437       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
66438 $as_echo_n "checking for icecc build environment for build compiler... " >&6; }
66439       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
66440 $as_echo "${ICECC_ENV_BUNDLE}" >&6; }
66441       BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
66442           ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
66443     else
66444       BUILD_ICECC="${ICECC}"
66445     fi
66446 
66447 
66448   fi
66449 
66450 
66451 # Can the C/C++ compiler use precompiled headers?
66452 
66453 
66454   ###############################################################################
66455   #
66456   # Can the C/C++ compiler use precompiled headers?
66457   #
66458   # Check whether --enable-precompiled-headers was given.
66459 if test "${enable_precompiled_headers+set}" = set; then :
66460   enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
66461 else
66462   ENABLE_PRECOMPH=yes
66463 fi
66464 
66465 
66466   USE_PRECOMPILED_HEADER=true
66467   { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
66468 $as_echo_n "checking If precompiled header is enabled... " >&6; }
66469   if test "x$ENABLE_PRECOMPH" = xno; then
66470     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
66471 $as_echo "no, forced" >&6; }
66472     USE_PRECOMPILED_HEADER=false
66473   elif test "x$ICECC" != "x"; then
66474     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
66475 $as_echo "no, does not work effectively with icecc" >&6; }
66476     USE_PRECOMPILED_HEADER=false
66477   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
66478     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
66479 $as_echo "no, does not work with Solaris Studio" >&6; }
66480     USE_PRECOMPILED_HEADER=false
66481   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
66482     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
66483 $as_echo "no, does not work with xlc" >&6; }
66484     USE_PRECOMPILED_HEADER=false
66485   else
66486     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66487 $as_echo "yes" >&6; }
66488   fi
66489 
66490   if test "x$ENABLE_PRECOMPH" = xyes; then
66491     # Check that the compiler actually supports precomp headers.
66492     if test "x$TOOLCHAIN_TYPE" = xgcc; then
66493       { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
66494 $as_echo_n "checking that precompiled headers work... " >&6; }
66495       echo "int alfa();" > conftest.h
66496       $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
66497       if test ! -f conftest.hpp.gch; then
66498         USE_PRECOMPILED_HEADER=false
66499         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66500 $as_echo "no" >&6; }
66501       else
66502         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66503 $as_echo "yes" >&6; }
66504       fi
66505       $RM conftest.h conftest.hpp.gch
66506     fi
66507   fi
66508 
66509 
66510 
66511 
66512 # Setup use of ccache, if available
66513 
66514   # Check whether --enable-ccache was given.
66515 if test "${enable_ccache+set}" = set; then :
66516   enableval=$enable_ccache;
66517 fi
66518 
66519 
66520   CCACHE_STATUS=
66521   { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
66522 $as_echo_n "checking is ccache enabled... " >&6; }
66523   if test "x$enable_ccache" = xyes; then
66524     if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
66525       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66526 $as_echo "yes" >&6; }
66527       OLD_PATH="$PATH"
66528       if test "x$TOOLCHAIN_PATH" != x; then
66529         PATH=$TOOLCHAIN_PATH:$PATH
66530       fi
66531 
66532 
66533 
66534   # Publish this variable in the help.
66535 
66536 
66537   if [ -z "${CCACHE+x}" ]; then
66538     # The variable is not set by user, try to locate tool using the code snippet
66539     for ac_prog in ccache
66540 do
66541   # Extract the first word of "$ac_prog", so it can be a program name with args.
66542 set dummy $ac_prog; ac_word=$2
66543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66544 $as_echo_n "checking for $ac_word... " >&6; }
66545 if ${ac_cv_path_CCACHE+:} false; then :
66546   $as_echo_n "(cached) " >&6
66547 else
66548   case $CCACHE in
66549   [\\/]* | ?:[\\/]*)
66550   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66551   ;;
66552   *)
66553   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66554 for as_dir in $PATH
66555 do
66556   IFS=$as_save_IFS
66557   test -z "$as_dir" && as_dir=.
66558     for ac_exec_ext in '' $ac_executable_extensions; do
66559   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66560     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66561     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66562     break 2
66563   fi
66564 done
66565   done
66566 IFS=$as_save_IFS
66567 
66568   ;;
66569 esac
66570 fi
66571 CCACHE=$ac_cv_path_CCACHE
66572 if test -n "$CCACHE"; then
66573   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66574 $as_echo "$CCACHE" >&6; }
66575 else
66576   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66577 $as_echo "no" >&6; }
66578 fi
66579 
66580 
66581   test -n "$CCACHE" && break
66582 done
66583 
66584   else
66585     # The variable is set, but is it from the command line or the environment?
66586 
66587     # Try to remove the string !CCACHE! from our list.
66588     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
66589     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66590       # If it failed, the variable was not from the command line. Ignore it,
66591       # but warn the user (except for BASH, which is always set by the calling BASH).
66592       if test "xCCACHE" != xBASH; then
66593         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
66594 $as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
66595       fi
66596       # Try to locate tool using the code snippet
66597       for ac_prog in ccache
66598 do
66599   # Extract the first word of "$ac_prog", so it can be a program name with args.
66600 set dummy $ac_prog; ac_word=$2
66601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66602 $as_echo_n "checking for $ac_word... " >&6; }
66603 if ${ac_cv_path_CCACHE+:} false; then :
66604   $as_echo_n "(cached) " >&6
66605 else
66606   case $CCACHE in
66607   [\\/]* | ?:[\\/]*)
66608   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66609   ;;
66610   *)
66611   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66612 for as_dir in $PATH
66613 do
66614   IFS=$as_save_IFS
66615   test -z "$as_dir" && as_dir=.
66616     for ac_exec_ext in '' $ac_executable_extensions; do
66617   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66618     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66619     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66620     break 2
66621   fi
66622 done
66623   done
66624 IFS=$as_save_IFS
66625 
66626   ;;
66627 esac
66628 fi
66629 CCACHE=$ac_cv_path_CCACHE
66630 if test -n "$CCACHE"; then
66631   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66632 $as_echo "$CCACHE" >&6; }
66633 else
66634   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66635 $as_echo "no" >&6; }
66636 fi
66637 
66638 
66639   test -n "$CCACHE" && break
66640 done
66641 
66642     else
66643       # If it succeeded, then it was overridden by the user. We will use it
66644       # for the tool.
66645 
66646       # First remove it from the list of overridden variables, so we can test
66647       # for unknown variables in the end.
66648       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66649 
66650       # Check if we try to supply an empty value
66651       if test "x$CCACHE" = x; then
66652         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
66653 $as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
66654         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
66655 $as_echo_n "checking for CCACHE... " >&6; }
66656         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66657 $as_echo "disabled" >&6; }
66658       else
66659         # Check if the provided tool contains a complete path.
66660         tool_specified="$CCACHE"
66661         tool_basename="${tool_specified##*/}"
66662         if test "x$tool_basename" = "x$tool_specified"; then
66663           # A command without a complete path is provided, search $PATH.
66664           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
66665 $as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
66666           # Extract the first word of "$tool_basename", so it can be a program name with args.
66667 set dummy $tool_basename; ac_word=$2
66668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66669 $as_echo_n "checking for $ac_word... " >&6; }
66670 if ${ac_cv_path_CCACHE+:} false; then :
66671   $as_echo_n "(cached) " >&6
66672 else
66673   case $CCACHE in
66674   [\\/]* | ?:[\\/]*)
66675   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66676   ;;
66677   *)
66678   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66679 for as_dir in $PATH
66680 do
66681   IFS=$as_save_IFS
66682   test -z "$as_dir" && as_dir=.
66683     for ac_exec_ext in '' $ac_executable_extensions; do
66684   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66685     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66686     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66687     break 2
66688   fi
66689 done
66690   done
66691 IFS=$as_save_IFS
66692 
66693   ;;
66694 esac
66695 fi
66696 CCACHE=$ac_cv_path_CCACHE
66697 if test -n "$CCACHE"; then
66698   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66699 $as_echo "$CCACHE" >&6; }
66700 else
66701   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66702 $as_echo "no" >&6; }
66703 fi
66704 
66705 
66706           if test "x$CCACHE" = x; then
66707             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66708           fi
66709         else
66710           # Otherwise we believe it is a complete path. Use it as it is.
66711           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
66712 $as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
66713           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
66714 $as_echo_n "checking for CCACHE... " >&6; }
66715           if test ! -x "$tool_specified"; then
66716             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66717 $as_echo "not found" >&6; }
66718             as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
66719           fi
66720           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66721 $as_echo "$tool_specified" >&6; }
66722         fi
66723       fi
66724     fi
66725 
66726   fi
66727 
66728 
66729 
66730   if test "x$CCACHE" = x; then
66731     as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
66732   fi
66733 
66734 
66735       PATH="$OLD_PATH"
66736       CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
66737       CCACHE_STATUS="Active ($CCACHE_VERSION)"
66738     else
66739       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66740 $as_echo "no" >&6; }
66741       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
66742 $as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
66743     fi
66744   elif test "x$enable_ccache" = xno; then
66745     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
66746 $as_echo "no, explicitly disabled" >&6; }
66747     CCACHE_STATUS="Disabled"
66748   elif test "x$enable_ccache" = x; then
66749     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66750 $as_echo "no" >&6; }
66751   else
66752     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
66753 $as_echo "unknown" >&6; }
66754     as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
66755   fi
66756 
66757 
66758 
66759 # Check whether --with-ccache-dir was given.
66760 if test "${with_ccache_dir+set}" = set; then :
66761   withval=$with_ccache_dir;
66762 fi
66763 
66764 
66765   if test "x$with_ccache_dir" != x; then
66766     # When using a non home ccache directory, assume the use is to share ccache files
66767     # with other users. Thus change the umask.
66768     SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
66769     if test "x$CCACHE" = x; then
66770       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
66771 $as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
66772     fi
66773   fi
66774 
66775   if test "x$CCACHE" != x; then
66776 
66777   if test "x$CCACHE" != x; then
66778     if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
66779       HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
66780           $GREP -e '^1\.' -e '^2\.' -e '^3\.0\.' -e '^3\.1\.'`
66781       if test "x$HAS_BAD_CCACHE" != "x"; then
66782         as_fn_error $? "On macosx, ccache 3.2 or later is required, found $CCACHE_VERSION" "$LINENO" 5
66783       fi
66784     fi
66785     if test "x$USE_PRECOMPILED_HEADER" = "xtrue"; then
66786       HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
66787           $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
66788       if test "x$HAS_BAD_CCACHE" != "x"; then
66789         as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
66790       fi
66791       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
66792 $as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
66793       CCACHE_PRECOMP_FLAG="-fpch-preprocess"
66794       PUSHED_FLAGS="$CXXFLAGS"
66795       CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
66796       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
66797 /* end confdefs.h.  */
66798 
66799 int
66800 main ()
66801 {
66802 
66803   ;
66804   return 0;
66805 }
66806 _ACEOF
66807 if ac_fn_cxx_try_compile "$LINENO"; then :
66808   CC_KNOWS_CCACHE_TRICK=yes
66809 else
66810   CC_KNOWS_CCACHE_TRICK=no
66811 fi
66812 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
66813       CXXFLAGS="$PUSHED_FLAGS"
66814       if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
66815         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66816 $as_echo "yes" >&6; }
66817         CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
66818 
66819         CCACHE_SLOPPINESS=pch_defines,time_macros
66820       else
66821         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66822 $as_echo "no" >&6; }
66823         as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
66824       fi
66825     fi
66826 
66827     CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
66828         CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
66829 
66830     if test "x$SET_CCACHE_DIR" != x; then
66831       mkdir -p $CCACHE_DIR > /dev/null 2>&1
66832       chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
66833     fi
66834   fi
66835 
66836   fi
66837 
66838 
66839 ###############################################################################
66840 #
66841 # And now the finish...
66842 #
66843 ###############################################################################
66844 
66845 # Check for some common pitfalls
66846 
66847   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
66848     file_to_test="$SRC_ROOT/LICENSE"
66849     if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
66850       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
66851     fi
66852   fi
66853 
66854 
66855   # Did user specify any unknown variables?
66856 
66857   if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
66858     # Replace the separating ! with spaces before presenting for end user.
66859     unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
66860     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
66861 $as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
66862   fi
66863 
66864 
66865   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
66866 $as_echo_n "checking if build directory is on local disk... " >&6; }
66867 
66868   # df -l lists only local disks; if the given directory is not found then
66869   # a non-zero exit code is given
66870   if test "x$DF" = x; then
66871     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
66872       # msys does not have df; use Windows "net use" instead.
66873       IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
66874       if test "x$IS_NETWORK_DISK" = x; then
66875         OUTPUT_DIR_IS_LOCAL="yes"
66876       else
66877         OUTPUT_DIR_IS_LOCAL="no"
66878       fi
66879     else
66880       # No df here, say it's local
66881       OUTPUT_DIR_IS_LOCAL="yes"
66882     fi
66883   else
66884     if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
66885       OUTPUT_DIR_IS_LOCAL="yes"
66886     else
66887       OUTPUT_DIR_IS_LOCAL="no"
66888     fi
66889   fi
66890 
66891   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
66892 $as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
66893 
66894 
66895 
66896   # Check if the user has any old-style ALT_ variables set.
66897   FOUND_ALT_VARIABLES=`env | grep ^ALT_`
66898 
66899   # Before generating output files, test if they exist. If they do, this is a reconfigure.
66900   # Since we can't properly handle the dependencies for this, warn the user about the situation
66901   if test -e $OUTPUT_ROOT/spec.gmk; then
66902     IS_RECONFIGURE=yes
66903   else
66904     IS_RECONFIGURE=no
66905   fi
66906 
66907 
66908 # At the end, call the custom hook. (Dummy macro if no custom sources available)
66909 
66910 
66911 # This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
66912 
66913   # Keep feature lists sorted and free of duplicates
66914   JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
66915   JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
66916   JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
66917   JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
66918   JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
66919   JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
66920   JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
66921 
66922   # Validate features
66923   for variant in $JVM_VARIANTS; do
66924     { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
66925 $as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
66926     features_var_name=JVM_FEATURES_$variant
66927     JVM_FEATURES_TO_TEST=${!features_var_name}
66928     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
66929 $as_echo "$JVM_FEATURES_TO_TEST" >&6; }
66930     NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
66931     STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
66932     INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
66933     if test "x$INVALID_FEATURES" != x; then
66934       as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
66935     fi
66936   done
66937 
66938 
66939 # We're messing a bit with internal autoconf variables to put the config.status
66940 # in the output directory instead of the current directory.
66941 CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
66942 
66943 # Create the actual output files. Now the main work of configure is done.
66944 cat >confcache <<\_ACEOF
66945 # This file is a shell script that caches the results of configure
66946 # tests run on this system so they can be shared between configure
66947 # scripts and configure runs, see configure's option --config-cache.
66948 # It is not useful on other systems.  If it contains results you don't
66949 # want to keep, you may remove or edit it.
66950 #
66951 # config.status only pays attention to the cache file if you give it
66952 # the --recheck option to rerun configure.
66953 #
66954 # `ac_cv_env_foo' variables (set or unset) will be overridden when
66955 # loading this file, other *unset* `ac_cv_foo' will be assigned the
66956 # following values.
66957 
66958 _ACEOF
66959 
66960 # The following way of writing the cache mishandles newlines in values,
66961 # but we know of no workaround that is simple, portable, and efficient.
66962 # So, we kill variables containing newlines.
66963 # Ultrix sh set writes to stderr and can't be redirected directly,
66964 # and sets the high bit in the cache file unless we assign to the vars.
66965 (
66966   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
66967     eval ac_val=\$$ac_var
66968     case $ac_val in #(
66969     *${as_nl}*)
66970       case $ac_var in #(
66971       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
66972 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
66973       esac
66974       case $ac_var in #(
66975       _ | IFS | as_nl) ;; #(
66976       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
66977       *) { eval $ac_var=; unset $ac_var;} ;;
66978       esac ;;
66979     esac
66980   done
66981 
66982   (set) 2>&1 |
66983     case $as_nl`(ac_space=' '; set) 2>&1` in #(
66984     *${as_nl}ac_space=\ *)
66985       # `set' does not quote correctly, so add quotes: double-quote
66986       # substitution turns \\\\ into \\, and sed turns \\ into \.
66987       sed -n \
66988         "s/'/'\\\\''/g;
66989           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
66990       ;; #(
66991     *)
66992       # `set' quotes correctly as required by POSIX, so do not add quotes.
66993       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
66994       ;;
66995     esac |
66996     sort
66997 ) |
66998   sed '
66999      /^ac_cv_env_/b end
67000      t clear
67001      :clear
67002      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
67003      t end
67004      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
67005      :end' >>confcache
67006 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
67007   if test -w "$cache_file"; then
67008     if test "x$cache_file" != "x/dev/null"; then
67009       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
67010 $as_echo "$as_me: updating cache $cache_file" >&6;}
67011       if test ! -f "$cache_file" || test -h "$cache_file"; then
67012         cat confcache >"$cache_file"
67013       else
67014         case $cache_file in #(
67015         */* | ?:*)
67016           mv -f confcache "$cache_file"$$ &&
67017           mv -f "$cache_file"$$ "$cache_file" ;; #(
67018         *)
67019           mv -f confcache "$cache_file" ;;
67020         esac
67021       fi
67022     fi
67023   else
67024     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
67025 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
67026   fi
67027 fi
67028 rm -f confcache
67029 
67030 test "x$prefix" = xNONE && prefix=$ac_default_prefix
67031 # Let make expand exec_prefix.
67032 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
67033 
67034 # Transform confdefs.h into DEFS.
67035 # Protect against shell expansion while executing Makefile rules.
67036 # Protect against Makefile macro expansion.
67037 #
67038 # If the first sed substitution is executed (which looks for macros that
67039 # take arguments), then branch to the quote section.  Otherwise,
67040 # look for a macro that doesn't take arguments.
67041 ac_script='
67042 :mline
67043 /\\$/{
67044  N
67045  s,\\\n,,
67046  b mline
67047 }
67048 t clear
67049 :clear
67050 s/^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*([^)]*)\)[   ]*\(.*\)/-D\1=\2/g
67051 t quote
67052 s/^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)/-D\1=\2/g
67053 t quote
67054 b any
67055 :quote
67056 s/[      `~#$^&*(){}\\|;'\''"<>?]/\\&/g
67057 s/\[/\\&/g
67058 s/\]/\\&/g
67059 s/\$/$$/g
67060 H
67061 :any
67062 ${
67063         g
67064         s/^\n//
67065         s/\n/ /g
67066         p
67067 }
67068 '
67069 DEFS=`sed -n "$ac_script" confdefs.h`
67070 
67071 
67072 ac_libobjs=
67073 ac_ltlibobjs=
67074 U=
67075 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
67076   # 1. Remove the extension, and $U if already installed.
67077   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
67078   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
67079   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
67080   #    will be set to the directory where LIBOBJS objects are built.
67081   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
67082   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
67083 done
67084 LIBOBJS=$ac_libobjs
67085 
67086 LTLIBOBJS=$ac_ltlibobjs
67087 
67088 
67089 
67090 : "${CONFIG_STATUS=./config.status}"
67091 ac_write_fail=0
67092 ac_clean_files_save=$ac_clean_files
67093 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
67094 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
67095 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
67096 as_write_fail=0
67097 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
67098 #! $SHELL
67099 # Generated by $as_me.
67100 # Run this file to recreate the current configuration.
67101 # Compiler output produced by configure, useful for debugging
67102 # configure, is in config.log if it exists.
67103 
67104 debug=false
67105 ac_cs_recheck=false
67106 ac_cs_silent=false
67107 
67108 SHELL=\${CONFIG_SHELL-$SHELL}
67109 export SHELL
67110 _ASEOF
67111 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
67112 ## -------------------- ##
67113 ## M4sh Initialization. ##
67114 ## -------------------- ##
67115 
67116 # Be more Bourne compatible
67117 DUALCASE=1; export DUALCASE # for MKS sh
67118 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
67119   emulate sh
67120   NULLCMD=:
67121   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
67122   # is contrary to our usage.  Disable this feature.
67123   alias -g '${1+"$@"}'='"$@"'
67124   setopt NO_GLOB_SUBST
67125 else
67126   case `(set -o) 2>/dev/null` in #(
67127   *posix*) :
67128     set -o posix ;; #(
67129   *) :
67130      ;;
67131 esac
67132 fi
67133 
67134 
67135 as_nl='
67136 '
67137 export as_nl
67138 # Printing a long string crashes Solaris 7 /usr/bin/printf.
67139 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
67140 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
67141 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
67142 # Prefer a ksh shell builtin over an external printf program on Solaris,
67143 # but without wasting forks for bash or zsh.
67144 if test -z "$BASH_VERSION$ZSH_VERSION" \
67145     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
67146   as_echo='print -r --'
67147   as_echo_n='print -rn --'
67148 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
67149   as_echo='printf %s\n'
67150   as_echo_n='printf %s'
67151 else
67152   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
67153     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
67154     as_echo_n='/usr/ucb/echo -n'
67155   else
67156     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
67157     as_echo_n_body='eval
67158       arg=$1;
67159       case $arg in #(
67160       *"$as_nl"*)
67161         expr "X$arg" : "X\\(.*\\)$as_nl";
67162         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
67163       esac;
67164       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
67165     '
67166     export as_echo_n_body
67167     as_echo_n='sh -c $as_echo_n_body as_echo'
67168   fi
67169   export as_echo_body
67170   as_echo='sh -c $as_echo_body as_echo'
67171 fi
67172 
67173 # The user is always right.
67174 if test "${PATH_SEPARATOR+set}" != set; then
67175   PATH_SEPARATOR=:
67176   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
67177     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
67178       PATH_SEPARATOR=';'
67179   }
67180 fi
67181 
67182 
67183 # IFS
67184 # We need space, tab and new line, in precisely that order.  Quoting is
67185 # there to prevent editors from complaining about space-tab.
67186 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
67187 # splitting by setting IFS to empty value.)
67188 IFS=" ""        $as_nl"
67189 
67190 # Find who we are.  Look in the path if we contain no directory separator.
67191 as_myself=
67192 case $0 in #((
67193   *[\\/]* ) as_myself=$0 ;;
67194   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67195 for as_dir in $PATH
67196 do
67197   IFS=$as_save_IFS
67198   test -z "$as_dir" && as_dir=.
67199     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
67200   done
67201 IFS=$as_save_IFS
67202 
67203      ;;
67204 esac
67205 # We did not find ourselves, most probably we were run as `sh COMMAND'
67206 # in which case we are not to be found in the path.
67207 if test "x$as_myself" = x; then
67208   as_myself=$0
67209 fi
67210 if test ! -f "$as_myself"; then
67211   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
67212   exit 1
67213 fi
67214 
67215 # Unset variables that we do not need and which cause bugs (e.g. in
67216 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
67217 # suppresses any "Segmentation fault" message there.  '((' could
67218 # trigger a bug in pdksh 5.2.14.
67219 for as_var in BASH_ENV ENV MAIL MAILPATH
67220 do eval test x\${$as_var+set} = xset \
67221   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
67222 done
67223 PS1='$ '
67224 PS2='> '
67225 PS4='+ '
67226 
67227 # NLS nuisances.
67228 LC_ALL=C
67229 export LC_ALL
67230 LANGUAGE=C
67231 export LANGUAGE
67232 
67233 # CDPATH.
67234 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
67235 
67236 
67237 # as_fn_error STATUS ERROR [LINENO LOG_FD]
67238 # ----------------------------------------
67239 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
67240 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
67241 # script with STATUS, using 1 if that was 0.
67242 as_fn_error ()
67243 {
67244   as_status=$1; test $as_status -eq 0 && as_status=1
67245   if test "$4"; then
67246     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
67247     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
67248   fi
67249   $as_echo "$as_me: error: $2" >&2
67250   as_fn_exit $as_status
67251 } # as_fn_error
67252 
67253 
67254 # as_fn_set_status STATUS
67255 # -----------------------
67256 # Set $? to STATUS, without forking.
67257 as_fn_set_status ()
67258 {
67259   return $1
67260 } # as_fn_set_status
67261 
67262 # as_fn_exit STATUS
67263 # -----------------
67264 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
67265 as_fn_exit ()
67266 {
67267   set +e
67268   as_fn_set_status $1
67269   exit $1
67270 } # as_fn_exit
67271 
67272 # as_fn_unset VAR
67273 # ---------------
67274 # Portably unset VAR.
67275 as_fn_unset ()
67276 {
67277   { eval $1=; unset $1;}
67278 }
67279 as_unset=as_fn_unset
67280 # as_fn_append VAR VALUE
67281 # ----------------------
67282 # Append the text in VALUE to the end of the definition contained in VAR. Take
67283 # advantage of any shell optimizations that allow amortized linear growth over
67284 # repeated appends, instead of the typical quadratic growth present in naive
67285 # implementations.
67286 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
67287   eval 'as_fn_append ()
67288   {
67289     eval $1+=\$2
67290   }'
67291 else
67292   as_fn_append ()
67293   {
67294     eval $1=\$$1\$2
67295   }
67296 fi # as_fn_append
67297 
67298 # as_fn_arith ARG...
67299 # ------------------
67300 # Perform arithmetic evaluation on the ARGs, and store the result in the
67301 # global $as_val. Take advantage of shells that can avoid forks. The arguments
67302 # must be portable across $(()) and expr.
67303 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
67304   eval 'as_fn_arith ()
67305   {
67306     as_val=$(( $* ))
67307   }'
67308 else
67309   as_fn_arith ()
67310   {
67311     as_val=`expr "$@" || test $? -eq 1`
67312   }
67313 fi # as_fn_arith
67314 
67315 
67316 if expr a : '\(a\)' >/dev/null 2>&1 &&
67317    test "X`expr 00001 : '.*\(...\)'`" = X001; then
67318   as_expr=expr
67319 else
67320   as_expr=false
67321 fi
67322 
67323 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
67324   as_basename=basename
67325 else
67326   as_basename=false
67327 fi
67328 
67329 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
67330   as_dirname=dirname
67331 else
67332   as_dirname=false
67333 fi
67334 
67335 as_me=`$as_basename -- "$0" ||
67336 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
67337          X"$0" : 'X\(//\)$' \| \
67338          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
67339 $as_echo X/"$0" |
67340     sed '/^.*\/\([^/][^/]*\)\/*$/{
67341             s//\1/
67342             q
67343           }
67344           /^X\/\(\/\/\)$/{
67345             s//\1/
67346             q
67347           }
67348           /^X\/\(\/\).*/{
67349             s//\1/
67350             q
67351           }
67352           s/.*/./; q'`
67353 
67354 # Avoid depending upon Character Ranges.
67355 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
67356 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
67357 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
67358 as_cr_digits='0123456789'
67359 as_cr_alnum=$as_cr_Letters$as_cr_digits
67360 
67361 ECHO_C= ECHO_N= ECHO_T=
67362 case `echo -n x` in #(((((
67363 -n*)
67364   case `echo 'xy\c'` in
67365   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
67366   xy)  ECHO_C='\c';;
67367   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
67368        ECHO_T=' ';;
67369   esac;;
67370 *)
67371   ECHO_N='-n';;
67372 esac
67373 
67374 rm -f conf$$ conf$$.exe conf$$.file
67375 if test -d conf$$.dir; then
67376   rm -f conf$$.dir/conf$$.file
67377 else
67378   rm -f conf$$.dir
67379   mkdir conf$$.dir 2>/dev/null
67380 fi
67381 if (echo >conf$$.file) 2>/dev/null; then
67382   if ln -s conf$$.file conf$$ 2>/dev/null; then
67383     as_ln_s='ln -s'
67384     # ... but there are two gotchas:
67385     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
67386     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
67387     # In both cases, we have to default to `cp -pR'.
67388     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
67389       as_ln_s='cp -pR'
67390   elif ln conf$$.file conf$$ 2>/dev/null; then
67391     as_ln_s=ln
67392   else
67393     as_ln_s='cp -pR'
67394   fi
67395 else
67396   as_ln_s='cp -pR'
67397 fi
67398 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
67399 rmdir conf$$.dir 2>/dev/null
67400 
67401 
67402 # as_fn_mkdir_p
67403 # -------------
67404 # Create "$as_dir" as a directory, including parents if necessary.
67405 as_fn_mkdir_p ()
67406 {
67407 
67408   case $as_dir in #(
67409   -*) as_dir=./$as_dir;;
67410   esac
67411   test -d "$as_dir" || eval $as_mkdir_p || {
67412     as_dirs=
67413     while :; do
67414       case $as_dir in #(
67415       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
67416       *) as_qdir=$as_dir;;
67417       esac
67418       as_dirs="'$as_qdir' $as_dirs"
67419       as_dir=`$as_dirname -- "$as_dir" ||
67420 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
67421          X"$as_dir" : 'X\(//\)[^/]' \| \
67422          X"$as_dir" : 'X\(//\)$' \| \
67423          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
67424 $as_echo X"$as_dir" |
67425     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
67426             s//\1/
67427             q
67428           }
67429           /^X\(\/\/\)[^/].*/{
67430             s//\1/
67431             q
67432           }
67433           /^X\(\/\/\)$/{
67434             s//\1/
67435             q
67436           }
67437           /^X\(\/\).*/{
67438             s//\1/
67439             q
67440           }
67441           s/.*/./; q'`
67442       test -d "$as_dir" && break
67443     done
67444     test -z "$as_dirs" || eval "mkdir $as_dirs"
67445   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
67446 
67447 
67448 } # as_fn_mkdir_p
67449 if mkdir -p . 2>/dev/null; then
67450   as_mkdir_p='mkdir -p "$as_dir"'
67451 else
67452   test -d ./-p && rmdir ./-p
67453   as_mkdir_p=false
67454 fi
67455 
67456 
67457 # as_fn_executable_p FILE
67458 # -----------------------
67459 # Test if FILE is an executable regular file.
67460 as_fn_executable_p ()
67461 {
67462   test -f "$1" && test -x "$1"
67463 } # as_fn_executable_p
67464 as_test_x='test -x'
67465 as_executable_p=as_fn_executable_p
67466 
67467 # Sed expression to map a string onto a valid CPP name.
67468 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
67469 
67470 # Sed expression to map a string onto a valid variable name.
67471 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
67472 
67473 
67474 exec 6>&1
67475 ## ----------------------------------- ##
67476 ## Main body of $CONFIG_STATUS script. ##
67477 ## ----------------------------------- ##
67478 _ASEOF
67479 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
67480 
67481 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67482 # Save the log message, to keep $0 and so on meaningful, and to
67483 # report actual input values of CONFIG_FILES etc. instead of their
67484 # values after options handling.
67485 ac_log="
67486 This file was extended by OpenJDK $as_me jdk9, which was
67487 generated by GNU Autoconf 2.69.  Invocation command line was
67488 
67489   CONFIG_FILES    = $CONFIG_FILES
67490   CONFIG_HEADERS  = $CONFIG_HEADERS
67491   CONFIG_LINKS    = $CONFIG_LINKS
67492   CONFIG_COMMANDS = $CONFIG_COMMANDS
67493   $ $0 $@
67494 
67495 on `(hostname || uname -n) 2>/dev/null | sed 1q`
67496 "
67497 
67498 _ACEOF
67499 
67500 case $ac_config_files in *"
67501 "*) set x $ac_config_files; shift; ac_config_files=$*;;
67502 esac
67503 
67504 
67505 
67506 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67507 # Files that config.status was made for.
67508 config_files="$ac_config_files"
67509 
67510 _ACEOF
67511 
67512 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67513 ac_cs_usage="\
67514 \`$as_me' instantiates files and other configuration actions
67515 from templates according to the current configuration.  Unless the files
67516 and actions are specified as TAGs, all are instantiated by default.
67517 
67518 Usage: $0 [OPTION]... [TAG]...
67519 
67520   -h, --help       print this help, then exit
67521   -V, --version    print version number and configuration settings, then exit
67522       --config     print configuration, then exit
67523   -q, --quiet, --silent
67524                    do not print progress messages
67525   -d, --debug      don't remove temporary files
67526       --recheck    update $as_me by reconfiguring in the same conditions
67527       --file=FILE[:TEMPLATE]
67528                    instantiate the configuration file FILE
67529 
67530 Configuration files:
67531 $config_files
67532 
67533 Report bugs to <build-dev@openjdk.java.net>.
67534 OpenJDK home page: <http://openjdk.java.net>."
67535 
67536 _ACEOF
67537 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67538 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
67539 ac_cs_version="\\
67540 OpenJDK config.status jdk9
67541 configured by $0, generated by GNU Autoconf 2.69,
67542   with options \\"\$ac_cs_config\\"
67543 
67544 Copyright (C) 2012 Free Software Foundation, Inc.
67545 This config.status script is free software; the Free Software Foundation
67546 gives unlimited permission to copy, distribute and modify it."
67547 
67548 ac_pwd='$ac_pwd'
67549 srcdir='$srcdir'
67550 AWK='$AWK'
67551 test -n "\$AWK" || AWK=awk
67552 _ACEOF
67553 
67554 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67555 # The default lists apply if the user does not specify any file.
67556 ac_need_defaults=:
67557 while test $# != 0
67558 do
67559   case $1 in
67560   --*=?*)
67561     ac_option=`expr "X$1" : 'X\([^=]*\)='`
67562     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
67563     ac_shift=:
67564     ;;
67565   --*=)
67566     ac_option=`expr "X$1" : 'X\([^=]*\)='`
67567     ac_optarg=
67568     ac_shift=:
67569     ;;
67570   *)
67571     ac_option=$1
67572     ac_optarg=$2
67573     ac_shift=shift
67574     ;;
67575   esac
67576 
67577   case $ac_option in
67578   # Handling of the options.
67579   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
67580     ac_cs_recheck=: ;;
67581   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
67582     $as_echo "$ac_cs_version"; exit ;;
67583   --config | --confi | --conf | --con | --co | --c )
67584     $as_echo "$ac_cs_config"; exit ;;
67585   --debug | --debu | --deb | --de | --d | -d )
67586     debug=: ;;
67587   --file | --fil | --fi | --f )
67588     $ac_shift
67589     case $ac_optarg in
67590     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
67591     '') as_fn_error $? "missing file argument" ;;
67592     esac
67593     as_fn_append CONFIG_FILES " '$ac_optarg'"
67594     ac_need_defaults=false;;
67595   --he | --h |  --help | --hel | -h )
67596     $as_echo "$ac_cs_usage"; exit ;;
67597   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
67598   | -silent | --silent | --silen | --sile | --sil | --si | --s)
67599     ac_cs_silent=: ;;
67600 
67601   # This is an error.
67602   -*) as_fn_error $? "unrecognized option: \`$1'
67603 Try \`$0 --help' for more information." ;;
67604 
67605   *) as_fn_append ac_config_targets " $1"
67606      ac_need_defaults=false ;;
67607 
67608   esac
67609   shift
67610 done
67611 
67612 ac_configure_extra_args=
67613 
67614 if $ac_cs_silent; then
67615   exec 6>/dev/null
67616   ac_configure_extra_args="$ac_configure_extra_args --silent"
67617 fi
67618 
67619 _ACEOF
67620 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67621 if \$ac_cs_recheck; then
67622   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
67623   shift
67624   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
67625   CONFIG_SHELL='$SHELL'
67626   export CONFIG_SHELL
67627   exec "\$@"
67628 fi
67629 
67630 _ACEOF
67631 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67632 exec 5>>config.log
67633 {
67634   echo
67635   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
67636 ## Running $as_me. ##
67637 _ASBOX
67638   $as_echo "$ac_log"
67639 } >&5
67640 
67641 _ACEOF
67642 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67643 _ACEOF
67644 
67645 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67646 
67647 # Handling of arguments.
67648 for ac_config_target in $ac_config_targets
67649 do
67650   case $ac_config_target in
67651     "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
67652     "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
67653     "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
67654     "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
67655     "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
67656 
67657   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
67658   esac
67659 done
67660 
67661 
67662 # If the user did not use the arguments to specify the items to instantiate,
67663 # then the envvar interface is used.  Set only those that are not.
67664 # We use the long form for the default assignment because of an extremely
67665 # bizarre bug on SunOS 4.1.3.
67666 if $ac_need_defaults; then
67667   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
67668 fi
67669 
67670 # Have a temporary directory for convenience.  Make it in the build tree
67671 # simply because there is no reason against having it here, and in addition,
67672 # creating and moving files from /tmp can sometimes cause problems.
67673 # Hook for its removal unless debugging.
67674 # Note that there is a small window in which the directory will not be cleaned:
67675 # after its creation but before its name has been assigned to `$tmp'.
67676 $debug ||
67677 {
67678   tmp= ac_tmp=
67679   trap 'exit_status=$?
67680   : "${ac_tmp:=$tmp}"
67681   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
67682 ' 0
67683   trap 'as_fn_exit 1' 1 2 13 15
67684 }
67685 # Create a (secure) tmp directory for tmp files.
67686 
67687 {
67688   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
67689   test -d "$tmp"
67690 }  ||
67691 {
67692   tmp=./conf$$-$RANDOM
67693   (umask 077 && mkdir "$tmp")
67694 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
67695 ac_tmp=$tmp
67696 
67697 # Set up the scripts for CONFIG_FILES section.
67698 # No need to generate them if there are no CONFIG_FILES.
67699 # This happens for instance with `./config.status config.h'.
67700 if test -n "$CONFIG_FILES"; then
67701 
67702 
67703 ac_cr=`echo X | tr X '\015'`
67704 # On cygwin, bash can eat \r inside `` if the user requested igncr.
67705 # But we know of no other shell where ac_cr would be empty at this
67706 # point, so we can use a bashism as a fallback.
67707 if test "x$ac_cr" = x; then
67708   eval ac_cr=\$\'\\r\'
67709 fi
67710 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
67711 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
67712   ac_cs_awk_cr='\\r'
67713 else
67714   ac_cs_awk_cr=$ac_cr
67715 fi
67716 
67717 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
67718 _ACEOF
67719 
67720 
67721 {
67722   echo "cat >conf$$subs.awk <<_ACEOF" &&
67723   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
67724   echo "_ACEOF"
67725 } >conf$$subs.sh ||
67726   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67727 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
67728 ac_delim='%!_!# '
67729 for ac_last_try in false false false false false :; do
67730   . ./conf$$subs.sh ||
67731     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67732 
67733   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
67734   if test $ac_delim_n = $ac_delim_num; then
67735     break
67736   elif $ac_last_try; then
67737     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67738   else
67739     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
67740   fi
67741 done
67742 rm -f conf$$subs.sh
67743 
67744 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67745 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
67746 _ACEOF
67747 sed -n '
67748 h
67749 s/^/S["/; s/!.*/"]=/
67750 p
67751 g
67752 s/^[^!]*!//
67753 :repl
67754 t repl
67755 s/'"$ac_delim"'$//
67756 t delim
67757 :nl
67758 h
67759 s/\(.\{148\}\)..*/\1/
67760 t more1
67761 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
67762 p
67763 n
67764 b repl
67765 :more1
67766 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
67767 p
67768 g
67769 s/.\{148\}//
67770 t nl
67771 :delim
67772 h
67773 s/\(.\{148\}\)..*/\1/
67774 t more2
67775 s/["\\]/\\&/g; s/^/"/; s/$/"/
67776 p
67777 b
67778 :more2
67779 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
67780 p
67781 g
67782 s/.\{148\}//
67783 t delim
67784 ' <conf$$subs.awk | sed '
67785 /^[^""]/{
67786   N
67787   s/\n//
67788 }
67789 ' >>$CONFIG_STATUS || ac_write_fail=1
67790 rm -f conf$$subs.awk
67791 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67792 _ACAWK
67793 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
67794   for (key in S) S_is_set[key] = 1
67795   FS = ""
67796 
67797 }
67798 {
67799   line = $ 0
67800   nfields = split(line, field, "@")
67801   substed = 0
67802   len = length(field[1])
67803   for (i = 2; i < nfields; i++) {
67804     key = field[i]
67805     keylen = length(key)
67806     if (S_is_set[key]) {
67807       value = S[key]
67808       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
67809       len += length(value) + length(field[++i])
67810       substed = 1
67811     } else
67812       len += 1 + keylen
67813   }
67814 
67815   print line
67816 }
67817 
67818 _ACAWK
67819 _ACEOF
67820 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67821 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
67822   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
67823 else
67824   cat
67825 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
67826   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
67827 _ACEOF
67828 
67829 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
67830 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
67831 # trailing colons and then remove the whole line if VPATH becomes empty
67832 # (actually we leave an empty line to preserve line numbers).
67833 if test "x$srcdir" = x.; then
67834   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
67835 h
67836 s///
67837 s/^/:/
67838 s/[      ]*$/:/
67839 s/:\$(srcdir):/:/g
67840 s/:\${srcdir}:/:/g
67841 s/:@srcdir@:/:/g
67842 s/^:*//
67843 s/:*$//
67844 x
67845 s/\(=[   ]*\).*/\1/
67846 G
67847 s/\n//
67848 s/^[^=]*=[       ]*$//
67849 }'
67850 fi
67851 
67852 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67853 fi # test -n "$CONFIG_FILES"
67854 
67855 
67856 eval set X "  :F $CONFIG_FILES      "
67857 shift
67858 for ac_tag
67859 do
67860   case $ac_tag in
67861   :[FHLC]) ac_mode=$ac_tag; continue;;
67862   esac
67863   case $ac_mode$ac_tag in
67864   :[FHL]*:*);;
67865   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
67866   :[FH]-) ac_tag=-:-;;
67867   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
67868   esac
67869   ac_save_IFS=$IFS
67870   IFS=:
67871   set x $ac_tag
67872   IFS=$ac_save_IFS
67873   shift
67874   ac_file=$1
67875   shift
67876 
67877   case $ac_mode in
67878   :L) ac_source=$1;;
67879   :[FH])
67880     ac_file_inputs=
67881     for ac_f
67882     do
67883       case $ac_f in
67884       -) ac_f="$ac_tmp/stdin";;
67885       *) # Look for the file first in the build tree, then in the source tree
67886          # (if the path is not absolute).  The absolute path cannot be DOS-style,
67887          # because $ac_f cannot contain `:'.
67888          test -f "$ac_f" ||
67889            case $ac_f in
67890            [\\/$]*) false;;
67891            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
67892            esac ||
67893            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
67894       esac
67895       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
67896       as_fn_append ac_file_inputs " '$ac_f'"
67897     done
67898 
67899     # Let's still pretend it is `configure' which instantiates (i.e., don't
67900     # use $as_me), people would be surprised to read:
67901     #    /* config.h.  Generated by config.status.  */
67902     configure_input='Generated from '`
67903           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
67904         `' by configure.'
67905     if test x"$ac_file" != x-; then
67906       configure_input="$ac_file.  $configure_input"
67907       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
67908 $as_echo "$as_me: creating $ac_file" >&6;}
67909     fi
67910     # Neutralize special characters interpreted by sed in replacement strings.
67911     case $configure_input in #(
67912     *\&* | *\|* | *\\* )
67913        ac_sed_conf_input=`$as_echo "$configure_input" |
67914        sed 's/[\\\\&|]/\\\\&/g'`;; #(
67915     *) ac_sed_conf_input=$configure_input;;
67916     esac
67917 
67918     case $ac_tag in
67919     *:-:* | *:-) cat >"$ac_tmp/stdin" \
67920       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
67921     esac
67922     ;;
67923   esac
67924 
67925   ac_dir=`$as_dirname -- "$ac_file" ||
67926 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
67927          X"$ac_file" : 'X\(//\)[^/]' \| \
67928          X"$ac_file" : 'X\(//\)$' \| \
67929          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
67930 $as_echo X"$ac_file" |
67931     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
67932             s//\1/
67933             q
67934           }
67935           /^X\(\/\/\)[^/].*/{
67936             s//\1/
67937             q
67938           }
67939           /^X\(\/\/\)$/{
67940             s//\1/
67941             q
67942           }
67943           /^X\(\/\).*/{
67944             s//\1/
67945             q
67946           }
67947           s/.*/./; q'`
67948   as_dir="$ac_dir"; as_fn_mkdir_p
67949   ac_builddir=.
67950 
67951 case "$ac_dir" in
67952 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
67953 *)
67954   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
67955   # A ".." for each directory in $ac_dir_suffix.
67956   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
67957   case $ac_top_builddir_sub in
67958   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
67959   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
67960   esac ;;
67961 esac
67962 ac_abs_top_builddir=$ac_pwd
67963 ac_abs_builddir=$ac_pwd$ac_dir_suffix
67964 # for backward compatibility:
67965 ac_top_builddir=$ac_top_build_prefix
67966 
67967 case $srcdir in
67968   .)  # We are building in place.
67969     ac_srcdir=.
67970     ac_top_srcdir=$ac_top_builddir_sub
67971     ac_abs_top_srcdir=$ac_pwd ;;
67972   [\\/]* | ?:[\\/]* )  # Absolute name.
67973     ac_srcdir=$srcdir$ac_dir_suffix;
67974     ac_top_srcdir=$srcdir
67975     ac_abs_top_srcdir=$srcdir ;;
67976   *) # Relative name.
67977     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
67978     ac_top_srcdir=$ac_top_build_prefix$srcdir
67979     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
67980 esac
67981 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
67982 
67983 
67984   case $ac_mode in
67985   :F)
67986   #
67987   # CONFIG_FILE
67988   #
67989 
67990 _ACEOF
67991 
67992 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67993 # If the template does not know about datarootdir, expand it.
67994 # FIXME: This hack should be removed a few years after 2.60.
67995 ac_datarootdir_hack=; ac_datarootdir_seen=
67996 ac_sed_dataroot='
67997 /datarootdir/ {
67998   p
67999   q
68000 }
68001 /@datadir@/p
68002 /@docdir@/p
68003 /@infodir@/p
68004 /@localedir@/p
68005 /@mandir@/p'
68006 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
68007 *datarootdir*) ac_datarootdir_seen=yes;;
68008 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
68009   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
68010 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
68011 _ACEOF
68012 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68013   ac_datarootdir_hack='
68014   s&@datadir@&$datadir&g
68015   s&@docdir@&$docdir&g
68016   s&@infodir@&$infodir&g
68017   s&@localedir@&$localedir&g
68018   s&@mandir@&$mandir&g
68019   s&\\\${datarootdir}&$datarootdir&g' ;;
68020 esac
68021 _ACEOF
68022 
68023 # Neutralize VPATH when `$srcdir' = `.'.
68024 # Shell code in configure.ac might set extrasub.
68025 # FIXME: do we really want to maintain this feature?
68026 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68027 ac_sed_extra="$ac_vpsub
68028 $extrasub
68029 _ACEOF
68030 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68031 :t
68032 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
68033 s|@configure_input@|$ac_sed_conf_input|;t t
68034 s&@top_builddir@&$ac_top_builddir_sub&;t t
68035 s&@top_build_prefix@&$ac_top_build_prefix&;t t
68036 s&@srcdir@&$ac_srcdir&;t t
68037 s&@abs_srcdir@&$ac_abs_srcdir&;t t
68038 s&@top_srcdir@&$ac_top_srcdir&;t t
68039 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
68040 s&@builddir@&$ac_builddir&;t t
68041 s&@abs_builddir@&$ac_abs_builddir&;t t
68042 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
68043 $ac_datarootdir_hack
68044 "
68045 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
68046   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
68047 
68048 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
68049   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
68050   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
68051       "$ac_tmp/out"`; test -z "$ac_out"; } &&
68052   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
68053 which seems to be undefined.  Please make sure it is defined" >&5
68054 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
68055 which seems to be undefined.  Please make sure it is defined" >&2;}
68056 
68057   rm -f "$ac_tmp/stdin"
68058   case $ac_file in
68059   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
68060   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
68061   esac \
68062   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
68063  ;;
68064 
68065 
68066 
68067   esac
68068 
68069 done # for ac_tag
68070 
68071 
68072 as_fn_exit 0
68073 _ACEOF
68074 ac_clean_files=$ac_clean_files_save
68075 
68076 test $ac_write_fail = 0 ||
68077   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
68078 
68079 
68080 # configure is writing to config.log, and then calls config.status.
68081 # config.status does its own redirection, appending to config.log.
68082 # Unfortunately, on DOS this fails, as config.log is still kept open
68083 # by configure, so config.status won't be able to write to it; its
68084 # output is simply discarded.  So we exec the FD to /dev/null,
68085 # effectively closing config.log, so it can be properly (re)opened and
68086 # appended to by config.status.  When coming back to configure, we
68087 # need to make the FD available again.
68088 if test "$no_create" != yes; then
68089   ac_cs_success=:
68090   ac_config_status_args=
68091   test "$silent" = yes &&
68092     ac_config_status_args="$ac_config_status_args --quiet"
68093   exec 5>/dev/null
68094   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
68095   exec 5>>config.log
68096   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
68097   # would make configure fail if this is the last instruction.
68098   $ac_cs_success || as_fn_exit 1
68099 fi
68100 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
68101   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
68102 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
68103 fi
68104 
68105 
68106 # After AC_OUTPUT, we need to do final work
68107 
68108 
68109   # Try to move config.log (generated by autoconf) to the configure-support directory.
68110   if test -e ./config.log; then
68111     $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
68112   fi
68113 
68114   # Rotate our log file (configure.log)
68115   if test -e "$OUTPUT_ROOT/configure.log.old"; then
68116     $RM -f "$OUTPUT_ROOT/configure.log.old"
68117   fi
68118   if test -e "$OUTPUT_ROOT/configure.log"; then
68119     $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
68120   fi
68121 
68122   # Move configure.log from current directory to the build output root
68123   if test -e ./configure.log; then
68124     $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
68125   fi
68126 
68127   # Make the compare script executable
68128   $CHMOD +x $OUTPUT_ROOT/compare.sh
68129 
68130 
68131 # Finally output some useful information to the user
68132 
68133   # Finally output some useful information to the user
68134 
68135   printf "\n"
68136   printf "====================================================\n"
68137   if test "x$no_create" != "xyes"; then
68138     if test "x$IS_RECONFIGURE" != "xyes"; then
68139       printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
68140     else
68141       printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
68142     fi
68143   else
68144     if test "x$IS_RECONFIGURE" != "xyes"; then
68145       printf "A configuration has been successfully checked but not created\n"
68146     else
68147       printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
68148     fi
68149   fi
68150   if test "x$CONFIGURE_COMMAND_LINE" != x; then
68151     printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
68152   else
68153     printf "using default settings.\n"
68154   fi
68155 
68156   printf "\n"
68157   printf "Configuration summary:\n"
68158   printf "* Debug level:    $DEBUG_LEVEL\n"
68159   printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
68160   printf "* JDK variant:    $JDK_VARIANT\n"
68161   printf "* JVM variants:   $JVM_VARIANTS\n"
68162   printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
68163   printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
68164 
68165   printf "\n"
68166   printf "Tools summary:\n"
68167   if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
68168     printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
68169   fi
68170   printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
68171   if test "x$TOOLCHAIN_VERSION" != "x"; then
68172     print_version=" $TOOLCHAIN_VERSION"
68173   fi
68174   printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
68175   printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
68176   printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
68177 
68178   printf "\n"
68179   printf "Build performance summary:\n"
68180   printf "* Cores to use:   $JOBS\n"
68181   printf "* Memory limit:   $MEMORY_SIZE MB\n"
68182   if test "x$CCACHE_STATUS" != "x"; then
68183     printf "* ccache status:  $CCACHE_STATUS\n"
68184   fi
68185   printf "\n"
68186 
68187   if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
68188     printf "NOTE: You have requested to build more than one version of the JVM, which\n"
68189     printf "will result in longer build times.\n"
68190     printf "\n"
68191   fi
68192 
68193   if test "x$FOUND_ALT_VARIABLES" != "x"; then
68194     printf "WARNING: You have old-style ALT_ environment variables set.\n"
68195     printf "These are not respected, and will be ignored. It is recommended\n"
68196     printf "that you clean your environment. The following variables are set:\n"
68197     printf "$FOUND_ALT_VARIABLES\n"
68198     printf "\n"
68199   fi
68200 
68201   if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
68202     printf "WARNING: Your build output directory is not on a local disk.\n"
68203     printf "This will severely degrade build performance!\n"
68204     printf "It is recommended that you create an output directory on a local disk,\n"
68205     printf "and run the configure script again from that directory.\n"
68206     printf "\n"
68207   fi
68208 
68209   if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
68210     printf "WARNING: The result of this configuration has overridden an older\n"
68211     printf "configuration. You *should* run 'make clean' to make sure you get a\n"
68212     printf "proper build. Failure to do so might result in strange build problems.\n"
68213     printf "\n"
68214   fi
68215 
68216   if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
68217     printf "WARNING: The result of this configuration was not saved.\n"
68218     printf "You should run without '--no-create | -n' to create the configuration.\n"
68219     printf "\n"
68220   fi
68221 
68222 
68223 
68224   # Locate config.log.
68225   if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
68226     CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
68227   elif test -e "./config.log"; then
68228     CONFIG_LOG_PATH="."
68229   fi
68230 
68231   if test -e "$CONFIG_LOG_PATH/config.log"; then
68232     $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
68233     if test $? -eq 0; then
68234       printf "The following warnings were produced. Repeated here for convenience:\n"
68235       # We must quote sed expression (using []) to stop m4 from eating the [].
68236       $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
68237       printf "\n"
68238     fi
68239   fi
68240